I used RVM to keep my Ruby 1.8.6 and 1.9.2 versions playing nicely. After installing Ruby 1.9.2 (wicked easy), I downloaded Rails 3.0.3, got the code base and ran 'bundler install' to install all the needed gems.
The process failed while building nokogiri. The error was:
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
Popping over to the supplied URL showed that I probably needed the libxml2 and libxslt libraries. I didn't think so because I was sure nokogiri was working in my other ruby environment, but nonetheless I ran:
sudo port install libxml2 libxsl
After doing so, I tried the bundle install again only to have the same error.Now I was looking at a crisis. One colleague who has successfully navigated this waterway recommended that I rely on homebrew for package management. However, I've used port and fink, plus homebrew doesn't link to system directories by default, so I knew there would be some pain. I briefly considered uninstalling port and moving entirely to homebrew, but I have nearly 200 installed packages. Didn't want to go there.
Simultaneously, I was working in another terminal when I realized that my subversion was no longer working. It was complaining about a newly installed libiconv, which was installed with the libxml2. This actually was a good thing.
Now cutting to the chase: The Berekly DB needed to be updated in order to make all these things work. So I uninstalled Berekly DB, which involved uninstalling apr-util, python26, subversion, serf, and gone-doc-utils (using port for all of this). Then I did a 'port clean
Subversion now worked, but the bundle install still failed. Confident that the problem lay elsewhere, I cast around and found Chris Roos' post on Libxml2 Problems when Installing Nokogiri.
The solution I chose was to do a universal install of the libxml and libxlst libraries with
$ sudo port upgrade --enforce-variants libxml2 +universal $ sudo port upgrade libxslt +universalThe bundle install worked after this, Subversion still works and I'm back in business.
No comments:
Post a Comment