To Documents
Ruby and Rails Installation for Windows
As of 9/815, the latest version of the Ruby installer available for download
installs Ruby 2.1.7. (Ruby 2.1.6 is installed in the CDM labs.) The latest
version of Rails is 4.2.4. (Rails 4.2.3 is installed in the labs.) Follow these directions to install them on your Windows
machine.
PC Ruby and Rails Installation
- Download the Ruby Installer. Download the Ruby
installer for Ruby 2.1.6 from http://rubyinstaller.org/downloads/
to your harddrive. The download file is rubyinstaller-2.1.6.exe.
Use the 32 bit installer even if you have a 64 bit machine. (The 32 bit
installer is more stable than the 64 bit installer.)
- Install Ruby. In the Windows Explorer, double click on the rubyinstaller-2.1.6.exe
file and follow the directions. By default, Ruby will be installed in the
C:\Ruby21 folder. Check the boxes "Install Tcl/Tk support", "Add Ruby executables to your PATH", and
"Associate .rb and .rbw files with this Ruby installation." Then click Install >> Finish.
- Check Ruby Version. To check if Ruby has been installed and that the environment is correctly configured, enter this
command in the Command Prompt Window:
> ruby -v
You should obtain
something like this:
ruby 2.1.7p400 (2015-08-18 revision 51623) [i386-mingw32]
- Install DevKit.
From http://rubyinstaller.org/downloads/, download the Development Kit
file for use with Ruby 2.0 and above (32bits version only). Double click the exe file
DevKit-mingw64-4.7.2-20130224-1151_sfx.exe
and have the files extracted to C:\DevKit. Open a Command Prompt Window and
enter the following commands to set up DevKit:
> cd c:\DevKit
> ruby dk.rb init
> ruby dk.rb install
With the last command, you should see output indicating that DevKit has been installed.
- Install Ruby on Rails. In a Command Prompt Window, enter
> gem install rails
- Check Rails Version. In the Command Prompt Window, enter:
> rails -v
You should obtain
Rails 4.2.4
Rails 4.2.3 is installed in the CDM labs.