I’m finally getting back to upgrading my app from Rails 2.3.8 to 3.1/3.2. After getting your post today about rbenv, I decided to install it, looking ahead to the need to upgrade my ruby version from 1.8.7 to 1.9.2 or 1.9.3. This in turn involved ripping out rvm, and then ripping out macports so I could install rbenv.
After (somewhat successfully) making those changes, I went to start my server and received an error message about the bundler version in my Gemfile, telling me I needed to change it from 1.0.22 to 1.3.5. After I’d done that, when I restarted the server, some sort of nokogiri error appeared, prompting me to uninstall and reinstall 1.5.9.
Somehow, though, in the process of switching from macports to homebrew, the various libraries nokogiri needs had gotten messed up. After consulting numerous blog posts and SO questions, I’m left with a “can’t find libxslt” error whenever I try to reinstall nokogiri 1.5.9. I’m unable to succesfully brew link libxml2 and libxslt, unfortunately.
Anyway, as a potential way around that, I thought of trying to install nokogiri 1.6.0, which apparently has libxml2 and libxslt already included. But when I set the nokogiri gem version in my Gemfile to 1.6.0 and try to bundle update --source nokogiri, I’m told I need ruby version 1.9.2.
Great, so now I can use rbenv to make that happen! I use rbenv install 1.9.2-p320, which seems to work fine. But when I go to bundle update --source nokogiri again, it doesn’t see the new ruby version. Typing ruby -v from the command line shows the old 1.8.7 version. rbenv version shows 1.9.2-p320, but nothing else seems to.
Sorry, ridiculously long preamble, but basically I’m struggling to get rbenv to set my ruby version in such a way that the bundle command sees it. And I’m also struggling with getting nokogiri to install. Any and all help would be greatly appreciated. Thanks!