Installing Ruby On Rails (Windows 7)

Hello guys,

I will do a quick guide on how to install Ruby on Rails on a Windows machine.

Things you’ll need to download:
Ruby 2.0.x
A development kit, I’ll be using one called DevKit-tdm-32-4.5.2-20111229-1559-sfx
RubyGems

When you’ve downloaded Ruby installer, run it and you should see a window like this:

You don’t need to check any of the boxes, leave it as it is.

Extract the DevKit to any folder you want, and remember the folders location.
Now I will asume that you’ve put into C:\DevKit
The next thing you’ll need to do is to search for a program called “Start command prompt with ruby”.

Open the command prompt and type a command

CD C:\\DevKit

This will select the folder we’ll be loading the kit from.
Go on and type

ruby dk.rb init

When you see a message

Initialization complete! Please review and modify the auto-generated’config.yml’ file to ensure it contains the root directories to all of the installed Rubies you want enhanced by the DevKit.

Enter the next line

ruby dk.rb install

After a couple of lines you’ll see that you’ve succesfully implemented the Development kit.

Extract your downloaded rubygems into a folder, and go there with CD

CD C:\\Ruby200\\RubyGemsx.x.x

Note: x.x.x means your version of RubyGems.
And type

ruby setup.rb

This will install the gems.

Now go back to the bin folder by writing:

CD C:\\Ruby200\\bin

Note: Ruby folder name may vary according to the current version.
And enter a line

gem install -r rails

Wait for a couple of minutes and when the lines stop, check if you’ve installed everything correctly by writing:

ruby -v

and

rails -v

If you don’t get any error messages, congratulations, you’ve just installed Ruby On Rails.

To be continued…

Peace,
Vincentas

Wouldn’t you want to use rvm or something to have virtual environments rather than locking into ruby 2.0 which is probably newer than lots of examples still . . .

That something being pik.
RVM is not supported on Windows (unfortunately).

Thanks for taking the time to post this Vincentas

That’s exactly why I wanted to do a guide on it, because installing Ruby on Windows can be a really tough job without RVM.
Peace,
Vincentas

Gotcha. I’ve installed rails on window in anger once but it was years ago, we use vagrant for all that sort of thing these days.