Install multiple versions of Rails on OSX


I am currently running Rails 2.0.2 on my machine, but for the purposes of a AWDR 2nd Edition, I also need to run Rails 1.8.6.

I looked around for a bit to find articles on how to do this, but I'm coming up short.

Is there anyone out there that knows how to pull this off?



You mean 1.2.6?

1.8.6 is the version of Ruby, right?

The 3rd edition of the book is now beta and the source code is compatible with Rails 2.0.2 already.

The second edition is based on Rails 1.2.3.

You can specify the version when you install Rails.

sudo gem install rails -v 1.2.3 –include-dependencies

If you are new to Rails and don't wanna be confused with multiple installations, I would suggest you uninstall Rails 2.0.2 first.

sudo gem uninstall -v 2.0.2 rails

If it's just for learning, go get Locomotive. It's a self-contained pre-2.0 rails installation. When you're done with it, just drop the folder in the trash. If you also get MAMP you'll have a self-contained Mysql installation too.

Thanks! That worked like a charm.

  • Justin


Alternatively, you can *keep* your 2.02 and install 1.2.3 on the same machine.

To specify which rails version to use, enter this when creating the app:

rails _1.2.3_ appname

instead of

rails appname

*keep the underscores around the version number.


Awesome! I was trying to figure out how to create rails projects using a specific version number, thanks!

I have 2.0.2 and 1.2.3 installed on the same machine and it seems to be working fine so far.

  • Justin

Hi , i want the same. i install the rails versions 1.2.3 and 2.0.2 in my ubuntu8.4 . but i unable to create project with versions which i want. its creating with 2.0.2 only ,not able to creating with 1.2.3 version. i used the command : rails _1.2.3_ myapp . plz help me . is there anything wrong i did.

Hi , but its not working for me . i am using rails versions 1.2.3 and 2.0.2 . but tha command rails _12.3_ appname not working for me. its creating only in rails 2.0.2 even if i gave 1.2.3 . my os is ubuntu8.4 . plz suggest solutin