RVM: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 20: | Line 20: | ||
== Project Setup and Best Practices == | == Project Setup and Best Practices == | ||
https://rvm.io/workflow/rvmrc/ | |||
<pre> | <pre> | ||
cd ~/projects/my_project/ | cd ~/projects/my_project/ | ||
rvm --rvmrc --create 1.9.1@my_project | rvm --rvmrc --create 1.9.1@my_project | ||
</pre> | |||
Now when you cd to the my_project directory, your ruby and gemset will change automatically: | |||
<pre> | |||
cd ~/projects/projectc | |||
[ruby-1.9.1-p243] (0) $ ruby -v | |||
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-darwin10.2.0] | |||
[ruby-1.9.1-p243] (0) $ gem env gemdir | |||
/Users/wayne/.rvm/gems/ruby/1.9.1@projectc | |||
</pre> | </pre> |
Revision as of 18:07, 10 July 2012
Ruby Version Manager
http://cheat.errtheblog.com/s/rvm/
https://rvm.io//rvm/best-practices/
To create a new gemset:
rvm ruby-1.9.3-p194@rails2314 --create
To switch to a particular gemset:
rvm gemset use rails2314
Now you can use gem
to install the needed gems.
May need to source /etc/profile.d/rvm.sh
to get things working.
Project Setup and Best Practices
https://rvm.io/workflow/rvmrc/
cd ~/projects/my_project/ rvm --rvmrc --create 1.9.1@my_project
Now when you cd to the my_project directory, your ruby and gemset will change automatically:
cd ~/projects/projectc [ruby-1.9.1-p243] (0) $ ruby -v ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-darwin10.2.0] [ruby-1.9.1-p243] (0) $ gem env gemdir /Users/wayne/.rvm/gems/ruby/1.9.1@projectc