2011年4月15日 星期五

let rvm (ruby version management) to manage your developing environment for ruby and ruby on rails..

To install rvm

$bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)


$rvm --version

rvm 1.6.1 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]

To list all rvm known packages

$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.6-head
[ruby-]1.8.7[-p334]
[ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431]
[ruby-]1.9.1-head
[ruby-]1.9.2[-p180]
[ruby-]1.9.2-head
ruby-head

# GoRuby
goruby

# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby[-1.6.0]
jruby-head

# Rubinius
rbx-1.0.1
rbx-1.1.0
rbx-1.1.1
rbx-1.2.0
rbx-1.2.1
rbx-1.2.2
rbx-1.2.3
rbx[-head]

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2011.03]
ree-1.8.6-head
ree-1.8.7-head

# Kiji
kiji

# MagLev
maglev[-25665]
maglev-head

# Mac OS X Snow Leopard Only
macruby[-0.10] # the default macruby
macruby-nightly
macruby-head # Build from the macruby git repository

# IronRuby -- Not implemented yet.
ironruby-0.9.3
ironruby-1.0-rc2
ironruby-head

user rvm to install your ruby packages.

$ vi ~/.profile

add following line to your .profile. all your installations with rvm will take effect.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.


$ source .profile

$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin9.8.0]

$ rails --version
Rails 3.0.6

$ rake --version
rake, version 0.8.7

$ gem --version
1.7.2