I have installed rails 2.2.2.when i created my rails project with version 2.2.2 its throwing error
Missing the Rails 2.2.2 gem. Please
gem install -v=2.2.2 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
but in my machine rails 2.2.2 is installed
In config/environment.rb file, look at the line-4 code. It think it should be RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION Hope this helps!
I have seen this problem when your gems are installed in your local (hidden) ~/.gems directory instead of the standard location. If you do not install a gem using 'sudo' (or run 'rake gems:install') it will install into this user gems directory instead of the system-level directory. Your Rails gems may be in the user dir instead of the system one.