Freezing Rails 2.2.2 to a new Rails app with git

Installs Rails 2.2 and Rubygems 1.3.1 to a new Rails app in a git repo. Rubygems 1.3.1 is necessary for Rails 2.2.2

#get the version of Ruby gems, need 1.3.1
gem -v

#install a gem to update rubygems
# don't do gem update --system
gemĀ  install rubygems-update

#to actually update the rubygems

#upgrade to Rails 2.2.2
gem install rails

#create skeleton rails app
rails project_name

#create skeleton rails app and add to git
cd project_name
git add .
git commit -m 'skeleton rails app'
git push origin master

#freeze Rails 2.2.2 to project_name/vendor/rails dir
rake rails:freeze:gems VERSION=2.2.2

#check for Rails 2.2.2 and RubyGems 1.3.1
ruby script/about

#add frozen Rails 2.2.2 to Git
cd vendor/rails
git add .
git commit -m 'frozen rails 2.2.2'
git push origin master