León de montaña-LibXML & Nokogiri


Acabo de actualizar a OS X Mountain Lion y estoy obteniendo lo siguiente cuando trabajo con rails y terminal.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8

He echado un vistazo a otras respuestas a una pregunta similar, pero no parecen impedir que aparezca el mensaje de advertencia.

Author: Domness, 2012-07-26

9 answers

Poner gem 'nokogiri' encima de gem 'pg' en mi Gemfile arregló esto para mí.

Mi Gemfile no tenía nokogiri, pero era una dependencia que estaba en Gemfile.bloquear, así que lo puse en mi Gemfile explícitamente.

 18
Author: Chris Aitchison,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-03-19 05:27:49

Estaba teniendo problemas similares al instalar nokogiri gem en ruby 1.9.2 Aparentemente Apple actualizó gcc... Arreglé esto con un enlace simbólico y luego la gema instalada muy bien:

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

 27
Author: codenamev,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-29 19:08:59

Pasar banderas para instalar gemas es generalmente una mala idea si tienes un Gemfile y estás usando bundler. Incluso si no lo estás, estarás en un libxml compilado a medida y probablemente no lo recuerdes...! Empecé hackeando tratando de hacer que esto funcione e incluso preparando la instalación de libxml2.

Resulta que, si reinstalas (y por lo tanto recompilas) la versión de ruby con la que estás trabajando (esperemos que con rvm), funcionará.

Entonces, para los usuarios de RVM:

    rvm list (gets your rubies - choose the one being used)
    rvm uninstall RUBY_VERSION
    rvm install SAME_RUBY_VERSION
    bundle (or gem install nokogiri)

Hizo el truco para me.

 14
Author: mavenroger,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-30 02:31:14

Usando Ruby 1.9.3-p194 y Rails 3.2.11 en OS X 10.8.2 (Mountain Lion), iniciando rails c dio la advertencia:

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8

El truco de desinstalar/instalar nokogiri no funcionó para mí. La solución era mucho más simple... La advertencia se evitó por completo editando el Gemifile para colocar 'nokogiri' encima de 'pg'.

Referencias:

 9
Author: Zaq,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-01-18 07:32:38

Toda la solución listada hasta ahora aquí no funcionó para mí.

Entonces, hice un brew uninstall libxml2 fue la versión libxml2 2.8.0 y supongo que mi os x tiene libxml2 versión 2.7.8 preinstalado

Luego hice gem uninstall nokogiri y luego gem install nokogiri

La advertencia se ha ido ahora. Pero es libxml2 versión 2.7.8 y no la última. Por lo tanto, aprecio, si sugiere alguna solución que funcione con la última versión de libxml2.

 7
Author: StarWars,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-09-25 09:21:49

Acabo de tener este problema.

Mi problema se resolvió sorprendentemente fácilmente.

gem uninstall nokogiri

Seleccionado all versions

Entonces gem install nokogiri y se fue.

Si está utilizando cerveza casera, puede brew update y brew doctor. Actualizar a Mountain lion incluso eliminó mi git y esas cosas. Lo instalé de nuevo instalando cc tools en Xcode y usando brew doctor para asegurarme de que es raring to go antes de lo anterior.

 6
Author: Damon Aw,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-26 13:22:08

Así que terminé usando el siguiente comando:

bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/

Y luego hacer:

gem uninstall nokogiri
gem install nokogiri

Y luego corrió

bundle install
 5
Author: Domness,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-26 16:18:05

Nada parecía funcionar para mí para arreglar esto.

Luego entré en xcode e instalé las herramientas de línea de comandos actualizadas, luego gem uninstall nokogiri y gem install nokogiri y funcionó!

 2
Author: wayne,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-11-06 01:57:43

Después de actualizar ruby-build

brew update
brew upgrade ruby-build

Acabo de reinstalar ruby (última versión)

rbenv install 1.9.3-p194

Y luego instalé todas las gemas relacionadas con mi proyecto, incluido nokogiri, sin tener más problemas.

gem install bundler
bundle
 1
Author: Thibaut Assus,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-27 14:42:21