I've just upgraded my rails version to rails 3.0. But suddenly I need a new rails app with old version of rails. I know the new version of rails change command line usage with 'rails new'. How can I create an old version of rails in this new rails 3 environment??
A:
If you need to switch back and forth, I would recommend using RVM. You can install different versions of Ruby and each can have its own set of gems. I use my system installed ruby (1.8.6?) on my Mac for Rails 2 dev, and then I installed Ruby 1.9.2 with RVM for my Rails 3 dev. Its as simple as doing this after you have RVM installed:
#install and use 1.9.2 for Rails 3
rvm install 1.9.2
rvm 1.9.2
rails new whatever
#switch back to system installed ruby for Rails 2
rvm system
rails whatever
cowboycoded
2010-09-23 01:43:52
+1
A:
Leonid Shevtsov provided instructions for how to do this here.
The easiest way to do it was:
Create the directory for the project
Create a
Gemfile
there containing
gem "rails", "2.3.9"
gem "sqlite3-ruby", :require => "sqlite3"
Run
bundle install
- Run
bundle exec rails .
to create an app in the current pathYou don't even need rvm to do this.
vonconrad
2010-09-23 01:59:34