本文介绍了我可以并排安装 Ruby on Rails 2.x 和 Ruby on Rails 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于玩 ROR 的 Ubuntu rails 环境.现在我正在运行 Rails 2.3.8.

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

我想研究 rails 3.是否可以并排运行两个开发环境?如果没有,我该如何清理 rails 2.x 系统以安装 rails 3?还是我需要设置一个全新的 Ubuntu 机器?

I want to look into rails 3. Is it possible to run both dev enviroments side-by-side?If not, how do I clean up my rails 2.x system to install rails 3?Or do I need to setup a whole new Ubuntu machine?

任何帮助,链接...指针会很棒!

Any help, links... pointers would be great!

推荐答案

我强烈推荐 Ruby 版本管理器 (rvm) - 请参阅 this railscast 了解更多信息.这使您可以在同一台机器上轻松管理不同版本的 Ruby.我相信这也应该使您能够将不同版本的 Rails 彼此分开,并允许您轻松地在它们之间切换 - 请参阅 http://rvm.beginrescueend.com/gemsets/basics/:

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

希望有帮助!

这篇关于我可以并排安装 Ruby on Rails 2.x 和 Ruby on Rails 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 14:30