10

I just downloaded Ruby 1.9.2, and I want it to completely replace the older version of Ruby (1.8.7) that I also have installed. (Mostly because I get confused when installing things with different versions floating around.)

What's the best way to do this? Do I uninstall the older version? (If so, how?) Can I just replace the old ruby1.8.7/bin/{ruby,irb} with the new ruby1.9.2/bin/{ruby,irb}?

I'm on a Windows 7 machine.

grautur
  • 29,955
  • 34
  • 93
  • 128

6 Answers6

9

recommend uninstall the old version using control panel -> Add/Remove programs

if they're not listed then just move their folder (ex: c:\ruby18) to the recycle bin.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
8

Versions after 1.9.x, do the following:

Close all Command Prompt windows to avoid locks.

Close all Windows Explorer windows to avoid locks.

Control Panel > System > Environment Varables > remove any paths in the PATH environment variable that have installations of Ruby.

Control Panel > Programs and Features > Uninstall any Ruby Installer apps listed.

Delete the Windows folders where installed.


Version 1.9.x or before:

Don't use the Control Panel > Programs and Features > Uninstall option. Instead, find the installation folder, and run "unins000.exe". If you don't, and try initializing other versions of Ruby, it will give you an error like below. If the folder is gone, re-install, and then run the "unins000.exe" file.

C:\row\devkit>ruby dk.rb install
[ERROR] Skipping invalid directory 'C:/Ruby193'
[INFO] Updating convenience notice gem override for 'C:/row/Ruby21'
[INFO] Installing 'C:/row/Ruby21/lib/ruby/site_ruby/devkit.rb'
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
  • 1
    Thanks. I had to run the uninstaller from both `C:\Ruby192` and `C:\Program Files\ruby-1.9.2\bin`, then delete the entry from my path. Sad there was no better way to get rid of old version or upgrade. Now I'm free! – culix May 12 '17 at 04:07
5

No need to delete versions. Just Unpack 1.8.7 to another folder and change global PATH variable.

Nakilon
  • 34,866
  • 14
  • 107
  • 142
  • I'm not actually sure where my 1.8.7 folder is (how do I find out? a search didn't produce anything), and the things in my /usr/bin are from ruby1.8.7. So can I just replace or delete the Ruby-related things in /usr/bin with the 1.9.2 versions, and also add C:/Ruby192 to my PATH? – grautur Sep 07 '10 at 23:59
  • Oh, sorry, I meant 1.9.2. Yeah, you can have both versions and use PATH. Also, in any time you can use the old one. – Nakilon Sep 08 '10 at 13:39
3

This isn't the answer you're looking for, but hopefully will help you in the future. You can use Pik on Windows (as opposed to RVM on Linux/Mac) to manage multiple concurrent versions of Ruby on the same development environment.

http://github.com/vertiginous/pik/

David
  • 208,112
  • 36
  • 198
  • 279
  • All I care about is not having to worry about whether something is using or getting installed to Ruby1.8.7 instead of 1.9.2, so is there any reason not to use Pik? – grautur Sep 08 '10 at 00:11
  • If it works as well as RVM does on my Mac, then I can't think of a reason not to use it. Basically it maintains which gems go to which environments (so you can customize each Ruby version different from others, install the same sets of gems for all of them, etc.) and lets you switch your current context between them (essentially by changing your PATH and any other necessary environmental settings). – David Sep 08 '10 at 00:19
1

On Windows 8.1 Professional I removed it simply by going to the Control Panel -> Programs and Features -> remove the version of Ruby you want.

georger
  • 1,568
  • 21
  • 24
0

go to the install file (ie. c:\RailsInstaller) and you should see a file called unins00. run this application to uninstall Rails

Mason
  • 1,662
  • 1
  • 9
  • 10