Installing Rails on Windows

It’s a frikkin nightmare. Here’s how I did it:

c:\> gem install rails

this failed with an error message which said “‘make ‘ is not recognized as an internal or external command” whilst trying to build the native extensions.

The native extensions are things that Ruby needs to compile on your native system. It does this using make, the original tool on which rake, nant, powershell and other build tools are based on.

So I went off and downloaded make

(don’t forget to add the make bin directory to your path)

Next issue, make had an error “libintl3.dll could not be found”. Balls. Turns out make has some dependencies you also need to download… It’s a little further down the list after binaries and source.

Next error:

"make: *** No rule to make target `/C/Ruby192/include/ruby-1.9.1/ruby.h'"

Balls. Balls. Balls.

Fix for this is to download the Ruby DevKit. Extract is and run the devkitvars.bat in the root of devkit, this adds loads of really useful stuff to your %PATH%.

Now try it again for the final time:

C:\RubyDevKit>gem install rails
Building native extensions. This could take a while...
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.0.gem (100%)
Fetching: rails-3.2.0.gem (100%)
Successfully installed json-1.6.5
Successfully installed rdoc-3.12
Successfully installed railties-3.2.0
Successfully installed rails-3.2.0
4 gems installed
Installing ri documentation for json-1.6.5...
Installing ri documentation for rdoc-3.12...
Installing ri documentation for railties-3.2.0...
Installing ri documentation for rails-3.2.0...
Installing RDoc documentation for json-1.6.5...
Installing RDoc documentation for rdoc-3.12...
Installing RDoc documentation for railties-3.2.0...
Installing RDoc documentation for rails-3.2.0...

and there was much rejoicing. YAAAY!

Now try to build a rails app:
c:\> rails new project_bob


C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.5/lib/bundler/ui.rb:56:in `': uninitialized constant Gem::SilentUI (NameError)


after a bit of googling, turns out my bundler was out of date. So….

C:\>gem update bundler

Let’s try making that new Rails app again. Fingers, toes, knees, eyes… all crossed.


Now cd into the app you just created and try
c:\project_bob> rails c
Loading development environment (Rails 3.2.0)

GET IN. All done. Now time to do some work. Hope this helps some other unfortunate soul.

2 thoughts on “Installing Rails on Windows

  1. Not sure how I ended up here – but this is just what I need! Over 5 years since the (one job) I used RoR and that was OS X. Tried install on W7 at weekend, bleeeeeeugh. You rock, thank you so much!!

What did you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s