Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to install Kitabu on Mac OS X 10.7.4.

When I tried to use gem install kitabu --pre to install kitabu, I got an error

ERROR:  Error installing kitabu:
        kitabu requires Ruby version ~> 1.9.

And the preinstalled ruby is not version 1.9.

ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]

Can I update preinstalled ruby to 1.9? If that's not possible, how can I install ruby 1.9 so that I can run it when gem is executed?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

No don't update the Apple supplied ruby as that could affect existing ruby scripts and will get overridden in a System Upgrade.

To install ruby see the Download Ruby page from the ruby language website (the main page of which you should have bookmarked)

The two ways that you should consider are

  1. Download the RVM. Then edit your .bash_profile to put the bin path of the install at the front of your PATH.

  2. Use a package manager (e.g. Macports, Fink, Homebrew) and put their path at the front of your PATH ( I would use this only if you have C libraries that you need as well)

share|improve this answer
1  
RVM. RVM. RVM. RVM. RVM. RVM. RVM. RVM. Period. –  Jason Salaz Jun 10 '12 at 8:54
    
RVM first until you need a binary library that us difficult to get –  Mark Jun 10 '12 at 9:04

I just want to throw in here that I much prefer rbenv to RVM. Using Homebrew install with:

$ brew update
$ brew install rbenv
$ brew install ruby-build
$ brew install rbenv-gemset
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.