views:

64

answers:

2

Hello I have both Rails2 and Rails3(beta 3) installed by Ruby Gems. Everything right now defaults to using Rails3. For instance rails myproject will create a new Rails3 template. How do I override this so everything goes to Rails2?

+3  A: 

Ok, after some googling, stumbled upon this article: http://www.nomachetejuggling.com/2008/03/12/using-multiple-versions-of-rails/

Just tested it and it works. I just get my exact version of Ruby on Rails, which is 2.3.5 and run rails like so:

rails _2.3.5_ myproject
Earlz
+2  A: 

I have been using RVM which allows you to run multiple of Ruby with isolation for sets of gems and other configuration. Really useful for testing and managing multiple versions of Rails.

Toby Hede
Even though I would consider my own answer more "correct" I actually began using RVM instead because I needed to be able to use Ruby 1.9.2-head, hence the reason I accepted this answer
Earlz