Search code examples
rubyrbenvosx-mavericksboxen

How do I run boxen in Mavericks with rbenv installed?


I recently upgraded to Mac OS 10.9 and now I get this message when I run boxen:

Bundler is not compatible with Ruby 2.0 or Rubygems 2.0. Please upgrade to Bundler 1.3 or higher. Can't bootstrap, dependencies are outdated

I imagined that I could just set boxen's .ruby-version file to something like 1.8.7, but based on the message above, it still seems to be using Ruby 2.0.

How can I run boxen in Mavericks?


Solution

  • I ran into the exact same issue. The answer is actually deceptively simple. Since Mavericks now includes Ruby 2.0.0p247 and Rubygems 2.0.3, and you apparently upgraded, your system ruby will not find your bundler or ansi gems. So what you need to do is install both with your system ruby, as root.

    sudo /usr/bin/gem install bundler
    sudo /usr/bin/gem install ansi
    

    Then just restart or terminal. You can now run boxen as you would normally. Also, in order not to keep old files lying around, you may want to cleanup /Library/Ruby/Gems/1.8/ because it will include your old installation of both bundler and ansi on a ruby and gem installation you no longer have.