uninstall ruby code example

Example 1: ruby gem uninstall

The command is simply: gem uninstall <gem-name>
# for a general uninstall

NOTE: maybe you need sudo, depens on your user rights. like so

  sudo gem uninstall <gem-name>

# remove all old versions of the gem
gem cleanup <gem-name>

# choose which ones you want to remove
gem uninstall <gem-name>

# remove version 1.1.9 only
gem uninstall <gem-name> --version 1.1.9

# remove all versions less than 1.3.4
gem uninstall <gem-name> --version '<1.3.4'

# remove ALL INSTALLED Gems (and starting over)
gem uninstall -aIx

  Options
  -a, --[no-]all                   Uninstall all matching versions
  -I, --[no-]ignore-dependencies   Ignore dependency requirements while
                                 uninstalling
  -x, --[no-]executables           Uninstall applicable executables without
                                 confirmation

Example 2: uninstall ruby windows

# You can uninstall it from Program and Features in Control Panel. 
# After that you can remove the directory to which you installed it. 
# If you didn't change it, then it is 
# C:\Program Files(x86)\Railsinstaller

Tags:

Ruby Example