How to install rails gems 2.3.5 on windows

Hi,

When I try to add generator to controller, I got error as "Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 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."

Can somebody please let me know how to install rails gem 2.3.5 successfully on a window machine

Thanks in advance for your help apr

What error do you get when you run "gem install rails" from the command line?

E. Litwin wrote:

What error do you get when you run "gem install rails" from the command line?

Hi,

I am getting below error

ERROR: http://gems.rubyonrails.org/ does not appear to be a repository ERROR: could not find gem rails locally or in a repository

Have you tried running the following in a command line window?

gem update --system

Bob

It should work. It worked for me. try gem install rails -v=2.3.5 instead of gem install rails --v=2.3.5

nirosh

Bob wrote:

Have you tried running the following in a command line window?

gem update --system

Bob

Bob,

When I tried with 'gem update --system', got following error

ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)     bad response Not Found 404 (RubyGems.org | your community gem host)

nirosh wrote:

It should work. It worked for me. try gem install rails -v=2.3.5 instead of gem install rails --v=2.3.5

nirosh

Nirosh,

When I tried with 'gem install rails -v=2.3.5', got following error

ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem rails locally or in a repository

better remove your ruby folder manually from the C:\ and try to reinstall then try the earlier command

nirosh wrote:

better remove your ruby folder manually from the C:\ and try to reinstall then try the earlier command

Thanks for help, I have updated it now using netbeans, it is worknig now...

thanks apr

just to clarify...you ran "gem update --system" by itself and not as an option on your "gem install rails" command correct?

Also, try adding http://rubygems.org/ to your gem sources by running the following command...

gem sources -a http://rubygems.org/

After that is run, try updating system again with...

gem update --system

and then try installing rails again with...

gem install rails -v 2.3.5

Hope this helps, Bob

Bob wrote:

just to clarify...you ran "gem update --system" by itself and not as an option on your "gem install rails" command correct?

Also, try adding http://rubygems.org/ to your gem sources by running the following command...

gem sources -a http://rubygems.org/

After that is run, try updating system again with...

gem update --system

and then try installing rails again with...

gem install rails -v 2.3.5

Hope this helps, Bob

Thanks bob, it is working now

apr