Gangmax Blog

Install RVM on Lion

First, Install homebrew and make sure you have “wget”, “readline” and “most” packages installed as well, refered here.

Then install rvm:

1
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

or update rvm to the latest version:

1
rvm get head

Install ruby 1.9.3:

1
rvm install 1.9.3

Set default:

1
rvm 1.9.3 --default

When I wanted to use octopress on github, after I “cd” into the local octopress directory, I was prompted to run the following command, because octopress declared to use ruby 1.9.2 in it’s “.rvmrc” file:

1
rvm install ruby-1.9.2-p318

But after I ran it, I got the following error:

1
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

I googled it and found the reason is Xcode 4.3 on Lion is incompatible with ruby 1.9.2. The solution came from here: just change 1.9.2 to 1.9.3 in the “.rvmrc” file.

Then you can use octopress on Lion, you may get the following warning message while run “rake generate” which will not affect the function:

1
2
MacBookAir:octopress user$ rake previewStarting to watch source with Jekyll and Compass. Starting Rack on port 4000
/Users/user/.rvm/gems/ruby-1.9.3-p125/gems/maruku-0.6.0/lib/maruku/input/parse_doc.rb:22:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.

Comments