0

I just downloaded Ruby 2.0.0 using RubyInstaller, but Ruby -v still says I'm running 1.9.3. What am I doing wrong?

I am running Windows 7 (which I know is not ideal, but is what I'm currently stuck with), and I have successfully run Ruby in the past.

Thanks!

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
jackerman09
  • 2,492
  • 5
  • 29
  • 46

3 Answers3

1

Checkout the PATH environment variable. Most likely it contains path to ruby1.9.3/bin. Change it to point to ruby2.0/bin

Konstantin Rudy
  • 2,237
  • 25
  • 22
  • Thanks. This might be a stupid question, but where do I find the Path environment variable to check out? – jackerman09 Jul 19 '13 at 18:29
  • 2
    @jackerman09 open a command prompt and enter the command "set PATH" (without the quotes). This will print the contents of the PATH environment variable. – Andy Jul 19 '13 at 19:40
  • @Andy, thanks. I see Ruby in the path "C:\RailsInstaller\Ruby1.9.3\bin, is this what I need to change? If so, how do I change it? Thanks again – jackerman09 Jul 19 '13 at 20:13
  • 1
    @jackerman09 Yes, that is what you need to change. If you right click Computer, select Properties, then go to Advanced Settings (I think, it's one of the links on the left), then click on Environment Variables. – Andy Jul 19 '13 at 21:07
  • Hey @Andy, I actually found this just before you responded, but changing it to 2.0 or to 2.0.0 don't change what is output when I run ruby -v. Any other possibilities you can think of? Also, I have User variables and System variables, and right now the current path only exists as a User variable. Is that a problem? Thanks again – jackerman09 Jul 19 '13 at 21:13
  • 1
    @jackerman09 Have you restarted the console after changing the variable ? – Konstantin Rudy Jul 19 '13 at 21:48
  • @roody, no I have not, but I'll try that. Thanks for the tip – jackerman09 Jul 19 '13 at 23:45
1

first uninstall all your rubies and then install ruby 2.0, you cannot maintain two versions of ruby without RVM or RBENV.

Sachin Singh
  • 7,107
  • 6
  • 40
  • 80
0

I did a combination of several answers here, including:

  • Uninstalling old versions of Ruby and reinstalling version 2.0.0
  • Update the path Environment variable to the new path
  • Restart the computer (I think this is what I was missing the whole time)

Thanks to everyone who helped!

jackerman09
  • 2,492
  • 5
  • 29
  • 46