My Profile Photo


I'm Jason, a web applications developer in the San Francisco Bay area.

Establishing New Ruby Environment in a Folder using RVM

I know this is documented on the official RVM website, but I hate having to look it up over and over again each time I want to create a new RVMRC file.

$ mkdir -p ~/projects/rails2test
$ cd ~/projects/rails2test
$ rvm --rvmrc --create 1.8.7@rails2test
$ cd ..
$ cd rails2test
= NOTICE                                                                     =
= RVM has encountered a new or modified .rvmrc file in the current directory =
= This is a shell script and therefore may contain any shell commands.       =
=                                                                            =
= Examine the contents of this file carefully to be sure the contents are    =
= safe before trusting it! ( Choose v[iew] below to view the contents )      =
Do you wish to trust this .rvmrc file? (/Users/jmiller/Documents/rails2-apps/.rvmrc)
y[es], n[o], v[iew], c[ancel]> y

I’m needing to setup a Rails 2.3.8 system, so I can test my gem for compatibility between it and Rails 3.0.9.

I stumbled onto an article with suggestions for how to install RubyGems for Rails 2.3.8. This seems to run with errors, but the last command seemed to complete without errors other than ‘README’ not found:

$ rvm all do gem install -v 1.4.2 rubygems-update
$ rvm gem update --system 1.4.2
$ update_rubygems
$ rvm all do gem install -v 2.3.8 rails
$ rails --version
Rails 2.3.8
$ ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin10.8.0]