If you get this warning on your local machine one of these steps might help:
Rebuilt the gem with the newer library
gem install --no-rdoc --no-ri nokogiri -- --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib
If you still get the error, try to uninstall all nokogiri versions with
gem uninstall nokogiri
and install nokogiri again.
Fixing the issue on servers
However, on our servers this probably will not work. On the server, gems are stored in the ../shared/bundle/ruby/:version/gems
directory (relative to the current
app directory).
If you do gem install
in the current
app directory, bundler will have no knowledge of this.
What you want to do instead is
bundle pristine nokogiri
and restart the application servers (e.g. b cap <environment> passenger:restart
)
This should install the right nokogiri version and make the warning go away.
Posted by Martin Straub to makandra dev (2012-09-27 14:05)