Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove older versions of Ruby (on Windows)

Tags:

windows

ruby

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.

like image 333
grautur Avatar asked Sep 07 '10 23:09

grautur


2 Answers

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.

like image 173
rogerdpack Avatar answered Nov 15 '22 20:11

rogerdpack


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'
like image 26
MacGyver Avatar answered Nov 15 '22 21:11

MacGyver