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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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