Can I install Ruby on Rails 2.x and Ruby on Rails 3 side by side

后端 未结 2 458
失恋的感觉
失恋的感觉 2020-12-29 14:21

I have a Ubuntu rails enviroment for playing around with ROR. Right now I am running Rails 2.3.8.

I want to look into rails 3. Is it possible to run both dev enviro

2条回答
  •  悲&欢浪女
    2020-12-29 14:56

    I would highly recommend Ruby Version Manager (rvm) - see this railscast for more information. This allows you to easily manage different versions of Ruby on the same machine. I believe this should also enable you to keep the different versions of Rails separate from each other, and allow you to switch between them easily - see this example from http://rvm.beginrescueend.com/gemsets/basics/ :

    rvm 1.9.2-head
    gem install rails -v 2.3.3
    
    rvm gemset create rails222 rails126
    Gemset 'rails222' created.
    Gemset 'rails126' created.
    
    rvm 1.9.2-head@rails222
    gem install rails -v 2.2.2
    
    rvm 1.9.2-head@rails126
    gem install rails -v 1.2.6
    

    Hope that helps!

提交回复
热议问题