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?
Normally you should be able to choose different gemsets and have there a specific ruby version. In the past I created always a clean an fresh new gemset for a new project..so first create a gemset, second choose the new gemset, third install the newest rails, fourth use it :-). Should work..
By using the "RBENV_VERSION=1.9. 2-p290" prefix in your command line, you're specifying which ruby rbenv should be concerned with. Then following that with the "rbenv exec" command, you can install rails. Just use the version flag as in the example to specify which version you want.
Use the following command:
rails _2.3.5_ new APP_NAME
This will create a rails project with version 2.3.5
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With