Short answer to a frequently asked question:
First install the rails version you need for your project
# install specific rails version. 1.2.6 in this case
gem install rails -v=1.2.6
this will generate a Rails 1.2.6 project
rails _1.2.6_ project
Just replace the version number with the one you need.