Unable to install ruby gems 2.3.5


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

You have to type following from command prompt
rails --version
       Probably that version not equal with the veriosn showing in
config/environment.rb as RAILS_GEM_VERSION.

So you have to install 2.3.5 rails by
gem install rails -v=2.3.5 OR simply gem install rails
     from command prompt