How to use Rails2 when Rails3 is installed

时光毁灭记忆、已成空白 提交于 2020-01-14 04:59:11

问题


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


来源:https://stackoverflow.com/questions/2796286/how-to-use-rails2-when-rails3-is-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!