I'm trying to figure out if I can run on the same server(I have an AWS runni开发者_运维技巧ng with ubuntu) a Rails 2 and a Rails 3 applications?
Is this possible? Or I'm just dreaming?
Thanks people.
Yes, it's possible. Ruby and RubyGems are designed to install and run different version of the same Gem on the same server and Rails it's nothing more than a Gem.
My suggestion is to use Bundler to isolate Gem dependencies and Rails versions. It's quite easy to do, Rails 3 uses Bundler by default. You can use Bunder with Rails 2.3 as well. The instructions are on the Bundler website.
When you deploy your project, Bundler will install the necessary dependencies and you'll be able to run two or more projects with several different versions of Rails on the same machine.
Yes it is possible. You need a Ruby Version Manager: https://rvm.io/
精彩评论