如何切换到旧版本的ruby/rails环境? [英] How do I switch to older versions of the ruby/rails environment?
问题描述
我正在尝试与Tekpub保持联系在rails screencast上构建您自己的博客.我还是非常红宝石的新手,问题在于我安装了Rails 3,而Rob使用的是旧版本(在我的脑海中:版本2.3.2).
I'm trying to keep along with the Tekpub Build your own blog on rails screencast. I'm still very much a ruby novice and the problem is that I have Rails 3 installed while Rob uses an older version (Of the top of my head: version 2.3.2).
我知道如何使用gem install rails --version=2.3.2
获取该版本的rails,但是当我键入rails new
时,该应用程序的版本为rails3.如何使该特定应用程序与旧版本一起使用?我知道这与rvm有关,但是除了基本的rvm use
操作外,我不知道该怎么做.
I know how to get that version of rails with gem install rails --version=2.3.2
but when I type rails new
the version of the application is rails 3. How do I make this particular app work with the older version? I know this has something to do with rvm but I have no idea how to do anything but the basic rvm use
operation.
推荐答案
尝试
rvm use <ruby version>
rvm gemset create rails2.3.2
rvm <ruby version>@rails2.3.2
gem install rails --version=2.3.2
最后,在旧版本的rails中创建新的rails应用程序的语法仅为:
Finally the syntax to create a new rails app in older versions of rails was just:
rails <appanme>
有关宝石集的更多信息: RVM:命名宝石集
For more information about gemsets: RVM: Named Gem Sets
这篇关于如何切换到旧版本的ruby/rails环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!