Installing Ruby 1.9.1 for Windows

Installing Ruby on Windows used to be very simple, due to the one-click installer.   Unfortunately, the project hasn’t had a release recently and the most recent stable release is 1.8.6, which contains some potential security issues.

Installing the Latest Binary Release

The solution is relatively simple though.  To start, uninstall any copy of Ruby you may have already.  This will reduce confusion as to what version is installed and where.  In this guide we’ll focus on 1.9.1 but  the instructions are the same for 1.8.7.

Go to the Ruby downloads page and select the 1.8.7 or 1.9.1 binary.

Unzip the file to C:\Ruby.  Then you’ll need to add C:\Ruby\bin to your path by following these directions:

  1. Click on the Start Menu then right click on Computer and click Properties
  2. Click Advanced System Settings
  3. Click Environment Variables
  4. Under System Variables, double click on the line with PATH in it and add ;C:\Ruby\bin to the end of it.  The semicolon is very important and must be before C:\Ruby\bin
  5. Click OK and restart any command prompt windows

You’re now ready to run Ruby for Windows! You can install most gems in the usual way you would on Linux or MacOS with the gem command.

UPDATE – Missing DLL Files

There are some missing DLL’s for some necessary Ruby gems (including built-in ones), such as readline, sqlite3, and gzip.  I’ve compiled a ZIP file containing them, just put them in your C:\Ruby\bin folder, available here.  If you aren’t comfortable using it, just go to the various sites for each library that is missing and grab the DLL from there (this is what I did).


One Response to “Installing Ruby 1.9.1 for Windows”

Leave a Reply