0

I have been following the RoR tutorial and have been getting a fair few errors and it was reconmended to reinstall rails.

So i did (windows):

gem uninstall rails

"which version of rails do you want to uninstall"

the options were 1 4.0.5, 2 4.1.1, 3 all versions

i pressed 3.

Then for the tutorial it specifies that you need rails version of 4.0.5, so i did

gem install rails --version 4.0.5

That went all good but now when I type

rails -v 

It says version "4.1.1" and if i try gem uninstall rails

It will say Rails 4.0.5 has been uninstalled. This is really confusing me and creating a few errors along the way because of how it doesn't have a secret_token.rb and instead has a secret.yml file. Does anyone know any solutions to this?

HarryLucas
  • 159
  • 8
  • There's probably more than one version of Rails in your path, so you'll need to track down the incorrect version. – tadman May 14 '14 at 14:54
  • thanksfor the reply, how would i go about doing this? – HarryLucas May 14 '14 at 14:58
  • Normally I'd say `which rails`, but that doesn't work in Windows. There might be an [alternative](http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line) that could help: The `where` command. Otherwise you might need to look through your `PATH` and poke around. – tadman May 14 '14 at 15:04
  • thanks I did 'where rails' and it came up with Ruby200\bin\rails. Thanks for your help Btw ill see if this works – HarryLucas May 14 '14 at 15:07

1 Answers1

0

If this is an issue, it's probably because you have more than one version of Rails in your path. You need to locate the incorrect version and remove it.

On systems with more than one version of Ruby installed this is fairly common.

tadman
  • 194,930
  • 21
  • 217
  • 240