Installing Ruby on Rails on Windows

UPDATE: Apparently this is a common problem, so if you want to go the easy route then use http://railsinstaller.org and disregard the rest of this post.

I’ve been trying to get Ruby on Rails installed for the last couple hours and ran into some snags, but I finally seem to have overcome them. This page is supposed to get you up and running, but it’s apparently more difficult than that for Windows users. So here’s the steps I ended up using:

  1. Download Ruby from http://rubyforge.org/frs/download.php/76952/rubyinstaller-1.9.3-p429.exe [1]
  2. Install Ruby to C:Ruby193 or similar (make sure there’s no spaces in the folder hierarchy)
  3. Download RubyGems from http://production.cf.rubygems.org/rubygems/rubygems-2.0.3.zip [2]
  4. Unzip RubyGems
  5. Install RubyGems using the command prompt (cmd)
    -> cd “path/to/folder/you/unzipped/it/to”
    -> ruby setup.rb
  6. Install rails
    -> gem install rails
  7. Download RubyDevKit from https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe [3]
  8. Extract to C:RubyDevKit
  9. Install RubyDevKit using cmd [4]
    -> cd “C:RubyDevKit”
    -> ruby dk.rb init
    -> ruby dk.rb install
  10. Create a folder for your rails app (anywhere)
  11. Initialize rails app [0]
    -> rails new “path/to/your/folder”
    -> cd “path/to/your/folder”
    -> rails server
  12. Notice that it tells you to run “bundle install”
    -> bundle install
    If it doesn’t work you may need to open cmd using right-click and “Run as Administrator” and try again.
  13. Now try to start the rails server again
    -> rails server
  14. Open your browser and go to http://localhost:3000 to verify it’s running

[1] http://rubyforge.org/frs/?group_id=167
[2] http://rubygems.org/pages/download
[3] http://rubyinstaller.org/downloads/
[4] https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Leave a Reply

Your email address will not be published. Required fields are marked *