Install Ruby, Rubygems, Ruby on Rails 3 on Windows

Install Ruby & Ruby on Rails on Windows

  1. Download Windows RubyInstaller from http://www.ruby-lang.org
  2. Run the executable when the download is completed
  3. Use the default settings except
    1. Use c:\eng\soft\ruby\ruby-1.8.7 for the Destination Folder
    2. Add Ruby Executables (c:\eng\soft\ruby\ruby-1.8.7\bin) to your PATH
  4. Open a new command window to verify the Ruby installation
    cmd> ruby -v
    ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
    
  5. Open a command window to install Rails 3.0
    cmd> gem install rails
    
  6. Install Ruby-debug
  7. Verify the Rails installation
    cmd> rails -v
    Rails 3.0.3
    

Gem Command

Use Ruby gem to install, update or remove ruby components

% gem install name     # Install ruby component "name"
% gem list             # List all installed ruby components
% gem update name      # Update ruby component "name"
% gem update           # Update all ruby components
% gem update --system  # Update gem
% gem uninstall name   # Remove ruby component "name"

Work around for a Ruby MySQL bug

Rails does not work well with the libmysql.dll supplied in MySQL v5.1

To work around the problem:

  1. Download the MySQL v5.0.x Windows download: "Without installer (unzip in C:)"
  2. Extract the bin\libmysql.dll in the zip file to C:\eng\soft\ruby\ruby-1.8.6\bin

    This may subject to change in different version of Rails

Install Eclipse Ruby Plugin

  1. Install Eclipse Plugin
    1. In Eclipse, select Help -> Install New Software...
    2. Click Add...
    3. And enter location for http://download.eclipse.org/technology/dltk/updates/
    4. Select DLTK and click Install...
  2. Configure Eclipse Ruby Plugin
    1. In Eclipse, select Window -> Preferences
    2. Select Ruby -> Interpreters & Add...
    3. Enter Ruby for Interpreter name
    4. Enter c:\eng\soft\ruby\ruby-1.8.7\bin\ruby.exe for Interpreter executable

Other IDE

  • Netbeans 6.9. (Version 7.0 has stopped the support of RoR)
  • RadRails