Remove older versions of Ruby (on Windows)

我的梦境 提交于 2019-12-05 00:11:31

问题


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.


回答1:


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/




回答2:


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.




回答3:


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




回答4:


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'



回答5:


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.




回答6:


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



来源:https://stackoverflow.com/questions/3663504/remove-older-versions-of-ruby-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!