Skip to content

Instantly share code, notes, and snippets.

@akrasic
Last active December 19, 2015 20:09
Show Gist options
  • Select an option

  • Save akrasic/6011567 to your computer and use it in GitHub Desktop.

Select an option

Save akrasic/6011567 to your computer and use it in GitHub Desktop.
Fix nokogiri issue
#!/bin/bash
# Install libxml2 2.8.0 and reinstall nokogiri 1.6.0
#
cd /usr/src/
wget ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
tar xzfv libxml2-2.8.0.tar.gz
cd libxml2-2.8.0
./configure --prefix=/usr/local/
make
make install
cd ~/
gem list --local | grep -q nokogiri
if [ "$?" -eq "0" ]; then
echo y | gem uninstall nokogiri
gem install nokogiri -- --with-xml2-include=/usr/local/include/libxml2/ --with-xml2-lib=/usr/local/lib
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment