Tuesday, February 14, 2012

RVM

Already have rvm installed and been using it, but haven't switched between rubies in a while.  Here's a refresher...

Added a file, .gemrc to my home directory.  One line in the file to prevent installing all the ri and rdoc files associated with Rails install.
gem: --no-ri --no-rdoc

$ rvm list
rvm rubies

=* ruby-1.8.7-p302 [ i686 ]
   ruby-1.9.2-p180 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

# To install rails for the current gemset:
$ gem install rails --version 3.0.11

# when looking at what rails -v, it says:
Could not find activesupport-3.0.6 in any of the sources
Run `bundle install` to install missing gems.

# ran bundle install

$ rails -v
Rails 3.0.6

# Thought I'd installed 3.0.11, but Gemfile probably has 3.0.6 gems.  Oh well, good enough for now.
# Now let's switch to use ruby 1.9.2 and see what rails is there.

$ rvm use ruby-1.9.2-p180

$ rails -v
Could not find rake-0.9.2.2 in any of the sources


Not sure what's going on here, but need 1.8.7 for johnson gem, so going to revert to that one and continue.

Note that opening a new terminal window results in use of the default ruby.

More info at the RVM site.

No comments:

Post a Comment