to clarify: there\'s only one rails
command, which gets installed from the latest Rails gem, which is Rails 3 ATM. However, I\'m required to create a Rails 2.3 app.
(Had to make a comment since I don't have enough Stack Overflow cred and can't directly respond to answers yet.)
For folks running rails 3 now the "new" command is now required for creating new rails applications. As such "new" will need to be appended to the end of the commands.
So for Leonid Shevtsov's answer, Step 4: bundle exec rails new .
And for Robert Speicher's answer: rails new .
The easiest way to do it was:
Create a Gemfile
there containing
gem "rails", "2.3.9"
gem "sqlite3-ruby", :require => "sqlite3"
Run bundle install
bundle exec rails .
to create an app in the current pathYou don't even need rvm to do this.
(I assume 2.3.11, given it's the latest)
rails _2.3.11_ new app
will do this for you without you having to muck about.
Install rvm and then create a new gemset, so that Rails 2 is isolated.
Or, go to the directory where you want your Rails 2 app to be, create a Gemfile like a Rails 3 app, but specify gem "rails", "~> 2.3"
and run bundle install
, and you should now be able to issue rails .