Updating Ruby on OSX Mountain Lion

This past weekend I tried to pick up where I left off with the Ruby on Rails Tutorial by Michael Hartl. I had last worked on the tutorial at the end of May. When I tried to pick up where I left off I found that none of my routes would work. Literally I couldn’t route to anything with “foo_path”. Since the tutorial had ended I had updated my OS to Mountain Lion and installed the newest version of Xcode, but hadn’t done any real Ruby on Rails work. Trying to run the app immediately ran me into problems.

I had been working with Rails 3.2.3 so I had additionally updated to 3.2.8. I updated my Gemfile and did a bundle install and Nokogiri started going nuts –

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8.

Thinking that the problem might be related I tried to fix Nokogiri’s issue I tried to start by fixing that. I found that other people were having the same issue; once, twice, three times!

To fix the Nokogiri issue I downloaded and installed Xcode Command Line tools and installed them. Uninstalled and then recompiled Ruby. All of that seemed to make Nokogiri happy. My routing was still broken. So I tried updating my gems again, still no luck at all with fixing the routing, however, a new error had appeared. I was getting an error with the gem “Addressable”. I knew I was at least getting closer. After this I decided to completely restart the Sample_App tutorial and create a brand new gemset. Magically, that seemed to fix all of the dependency issues and solved my problems with routing.

 

Leave a Reply

Your email address will not be published. Required fields are marked *