开发者

Ruby on Rails: using rails 2.3.x and 3.0 on same machine

I just finished a project with rails 2.3.8. Client won't pay for the migration, so I want to keep it as is.

I want to start a new project, which is to build my own homepage. Want to use similar tools but want to go to rails 3.0.

Can these versions co-exist on the same machine? If yes, what do I need to do? Found few pages online, but not sure they are up开发者_如何学Go-to-date (e.g. about rails 3 beta and rvm).


I'm using rvm and running 2.3.9 on ruby 1.8.7 and 3.0.1 on ruby 1.9.2 and it works quite well. I followed http://rvm.beginrescueend.com/rvm/install/ to get rvm installed and then switched to it with:

rvm use 1.9.2

Then you can install Rails 3 on that rvm, set up your new project and switch back to your system ruby and older rails when you need to with:

rvm use system

It's been a really great way of switching back/forth for me.


Make R3 the default for your system. Then freeze rake rails:freeze:edge RELEASE=2.3.8 applications if you need to develop with old versions


With rvm you can also use different gemsets with the same ruby installation: http://rvm.io/gemsets/basics/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜