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:
- Download Ruby from http://rubyforge.org/frs/download.php/76952/rubyinstaller-1.9.3-p429.exe [1]
- Install Ruby to C:Ruby193 or similar (make sure there’s no spaces in the folder hierarchy)
- Download RubyGems from http://production.cf.rubygems.org/rubygems/rubygems-2.0.3.zip [2]
- Unzip RubyGems
- Install RubyGems using the command prompt (cmd)
-> cd “path/to/folder/you/unzipped/it/to”
-> ruby setup.rb - Install rails
-> gem install rails - Download RubyDevKit from https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe [3]
- Extract to C:RubyDevKit
- Install RubyDevKit using cmd [4]
-> cd “C:RubyDevKit”
-> ruby dk.rb init
-> ruby dk.rb install - Create a folder for your rails app (anywhere)
- Initialize rails app [0]
-> rails new “path/to/your/folder”
-> cd “path/to/your/folder”
-> rails server - 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. - Now try to start the rails server again
-> rails server - 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