This is as much a reminder for myself as anything else – as I’ve now had to do this about a dozen times between repaving my laptop, home workstation, and work machine(s).
The How-ToDon't try to install RubyGems for Cygwin using the gem that comes with the Ruby One-Click Installer for Windows. Instead, get the tarball, or zip file, and install it using the included installer script.
Since RubyGems is pure Ruby you don't have to worry about having a compiler installed. It should just work with the default Cygwin install plus Ruby and its dependencies. To install it, do the following steps:
- Download the RubyGems tarball from Ruby Forge
- Unpack the tarball
- In a bash terminal, navigate to the unpacked directory
- Run the following command:
- Update RubyGems by running the following:
Note: You may need to run the updated command twice if you have any previously installed gems.