Keep your Rails/Rake/Gems up-to-date by running these commands:
Update the RubyGems system itself (required by Rails 2.0).
gem update –system
Update Rails-specific gems and installs any new components (specifically Active Resource).
gem install rails
Update Rake, the build tool used by Rails.
gem update rake
Update the Ruby bindings for the SQLite3 database.
gem update sqlite3-ruby .
For an existing project, also do this:
rake rails:update
…and edit the config/environment.rb file and set the correct GEM Version:
RAILS_GEM_VERSION = ‘2.1.0′ unless defined? RAILS_GEM_VERSION
You might want to make sure your migrations are up-to-date:
rake db:migrate
rake db:schema:dump
Check your GEM version:
gem –version
Downgrade/Rollback GEM
gem -v
List all the installed gems by typing:
gem list
.
View the documentation for all the installed gems by typing:
gem server
To access the documentation, point your browser to http://localhost:8808/
This command starts a web server on port 8808 by default.
You’ll see a list of the gems you have installed with a link to their RDoc documentation.
Install SQLite3:
gem install sqlite3-ruby
Force Rails to use MySQL (instead of the default SQLite3):
rails -d mysql myapp