简体   繁体   中英

Can I run a Rails 2 and a Rails 3 applications on the same server?

I'm trying to figure out if I can run on the same server(I have an AWS running 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM