简体   繁体   English

使用Rails 2启动Rails 3服务器

[英]Start Rails 3 server with Rails 2

I have a Rails 3 project, and I have a computer with Rails 2 installed. 我有一个Rails 3项目,我有一台安装了Rails 2的计算机。 Is there any way for me to start the server on that computer? 我有什么办法在那台电脑上启动服务器吗? I cannot update the computer to Rails 3 for various reasons. 由于各种原因,我无法将计算机更新到Rails 3。

You don't need to 'update the computer to rails 3', you can install multiple versions of rails concurrently and define which versions to use in each project. 您不需要“将计算机更新到rails 3”,您可以同时安装多个版本的rails并定义每个项目中使用的版本。

  • In Rails 2 projects the rails version is defined by RAILS_GEM_VERSION in environment.rb 在Rails 2项目中,rails版本由RAILS_GEM_VERSION中的RAILS_GEM_VERSION定义
  • In Rails 3 projects the rails version is defined by gem 'rails', '3.x.x' in the gemfile 在Rails 3项目中,rails版本由gem 'rails', '3.x.x'定义

If you also need multiple ruby versions: 如果您还需要多个ruby版本:

  • If on linux have a look at RVM 如果在linux上看看RVM
  • if on windows have a look at pik 如果在窗户上看看pik

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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