Recently I set up a ec2 server, using the great Bitnami ruby stack. I used bitnami, because I wanted to avoid having to deal with a bunch of server setup just to play around with a box. It worked great, but for some reason, I couldn’t get the Nokogiri gem to install on the box. After trying many many solutions, I found this post on StackOverflow about installing nokogiri 1.5.2 on bitnami. This was exactly what I was looking for, so my solution came down to, running the following command, with all libs, etc explicitly passed in.

sudo gem install nokogiri -- --with-xml2-dir=/opt/bitnami/common --with-xslt-dir=/opt/bitnami/common --with-xml2-include=/opt/bitnami/common/include/libxml2 --with-xslt-include=/opt/bitnami/common/include --with-xml2-lib=/opt/bitnami/common/lib --with-xslt-lib=/opt/bitnami/common/lib

Thanks StackOverflow, and thanks Bitnami

blog comments powered by Disqus
Dan Mayer Profile Pic
Welcome to Dan Mayer's development blog. I primary write about Ruby development, distributed teams, and dev/PM process. The archives go back to my first CS classes during college when I was first learning programming. I contribute to a few OSS projects and often work on my own projects, You can find my code on github.

Twitter @danmayer

Github @danmayer