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

bash

  1. #get the version of Ruby gems, need 1.3.1
  2. gem -v
  3.  
  4. #install a gem to update rubygems
  5. # don't do gem update --system
  6. gemĀ  install rubygems-update
  7.  
  8. #to actually update the rubygems
  9. update_rubygems
  10.  
  11. #upgrade to Rails 2.2.2
  12. gem install rails
  13.  
  14. #create skeleton rails app
  15. rails project_name
  16.  
  17. #create skeleton rails app and add to git
  18. cd project_name
  19. git add .
  20. git commit -m 'skeleton rails app'
  21. git push origin master
  22.  
  23. #freeze Rails 2.2.2 to project_name/vendor/rails dir
  24. rake rails:freeze:gems VERSION=2.2.2
  25.  
  26. #check for Rails 2.2.2 and RubyGems 1.3.1
  27. ruby script/about
  28.  
  29. #add frozen Rails 2.2.2 to Git
  30. cd vendor/rails
  31. git add .
  32. git commit -m 'frozen rails 2.2.2'
  33. git push origin master
Share