I understand that this post has long been resolved, but the original question remains:
Given the fact that I have a newer edition of Rails installed, is it possible for me to create an app with an earlier Rails version?
This question is relevant because when you create a rails app
$rails <app_name>
it will create an application with the code based on the most recent Rails version installed on your system. This means that even if you try and change the Rails version in environment.rb the code that makes up the application is still from the newer version. This will lead to incompatibilities due to the changing nature of Rails.
The simple answer is yes, it is possible to create a new Rails app based on an older version of Rails even if you have a newer version installed.
As an example, let's say I have Rails 2.2.2 installed on my system, but I want to create an app in Rails 2.0.2. (A good reason may be that my host has not yet upgraded to 2.2.2, or I'm following a tutorial or book that is written in 2.0.2)
You must also have the previous version of Rails (the one you want to create your application with - in this case 2.0.2) installed. Find out like this:
$ sudo gem list rails
rails (2.2.2)
which will tell you which versions of rails are installed on your system.
If the one you want isn't installed, install it like so:
$ sudo gem install rails --version 2.0.2 --include-dependencies --no-rdoc --no-ri
check it is now installed:
$sudo gem list rails
rails (2.2.2, 2.0.2)
Once it is installed you can then create a Rails app and specify what version you want to use:
syntax:
$rails _x.x.x_ <appname>example:
$rails _2.0.2_ app
A new app has been created with the 2.0.2 codebase, despite having 2.2.2 installed on the system as well.
Hope this helps someone out there, and goes in some way to answering the original question of this post.