I updated to the developer release of Lion and noticed I couldn\'t start rails apps anymore. Whenever I try to sudo bundle install
, I get the following error:
Install the ruby1.8-dev gem (or rather, the applicable *-dev gem), which will include all the header files. See: This question
I had similar problem, and after installing XCode 4.1, I also had to do the following command:
sudo port upgrade libxml2 libxslt
After that Nokogiri built without problems.
More info: http://tektastic.com/2011/07/ruby-mac-ports-and-os-x-lion.html
I found this worked via https://github.com/sparklemotion/nokogiri/issues/1166#issuecomment-56545974.
$ brew install libxml2
$ gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
Here's a more detailed approach if even this doesn't work. http://www.bullrico.com/2012/07/12/installing-nokogiri-after-updating-homebrew
It says: "can't find header files for ruby". In other words, you're missing the ruby headers in order to compile libxml/nokogiri as a ruby extension.
Consider installing ruby 1.9 (or 1.8) using macports or rvm. I'm not 100% on the second, but the first will automatically make the relevant headers available.
Consider installing a pre-1.6 version of nokigiri (gem install nokogiri -v '1.5.9'
)
Try to install "libxslt1-dev" and "libxml2-dev" packages.