How to Install Ruby on Rails on Windows

17 November 2013
Some of my friends keep asking me the same question "How to Install Ruby on Rails on Windows". So, I'm writing this post to save myself some time in the long run.
(If you are using Ubuntu then just use this Guide by Ryan Bigg)

Head over to Rails Installer and download "Ruby Installer" for appropriate Ruby version and also download Devkit.

Things to remember while installing Ruby via Ruby Installer:
1. Select "Add Ruby executable's to your PATH": This option will let you execute ruby files from command prompt.
2. Select "Associate .rb and .rbw files with the ruby installation"

Now double click on Ruby Installer and follow the instructions.

Install Devkit
1. Double click on devkit and extract to c:\devkit
2. Now open command prompt and change the directory to install path cd\devkit
3. Now run ruby dk.rb init
4. ruby dk.rb install

Installing Rails
1. Type "gem install rails" in command prompt
2. md c:\apps
3. cd\apps
4. rails new myRailsApp
5. rails server

Done. Congratulations you have successfully installed Rails and created a new Rails application.

By the way if you run into "JavaScript Runtime environment missing" error then just install Node.js

No comments: