Install Ruby on Rails on Windows guide

Install Ruby on Rails on Windows guide

I played around with Ruby on Rails and wanted to set up a developer environment with Rails server and Ruby, but didn’t find any straight forward and easy guides, so I wrote one instead. Following this guide you’ll get going developing and running Ruby in 10 minutes.

Download RubyInstaller and Dev kit from
If you run 64 bit, remember to get the 64 bit version of both Ruby and dev kit.

Install Rubyinstaller to C:\Ruby
Check “Install Tcl/Tk support”, “Add Ruby executables to your PATH” and “Assosiacte .rb and .rbw files with this Ruby installation”.

Install Ruby on Rails on Windows guide 01

Extract Dev kit to C:\Ruby\DevKit
Open Command Prompt and CD to C:\Ruby\DevKit


ruby dk.rb init

Install Ruby on Rails on Windows guide 02

Open C:\Ruby\DevKit\config.yml and ensure your Ruby location is included. It’s important that you have a “-” before the path like in the example. Save the file and go back to your Command Prompt.

Install Ruby on Rails on Windows guide 03


ruby dk.rb install

Install Ruby on Rails on Windows guide 04


gem install rails --no-rdoc --no-ri

Install Ruby on Rails on Windows guide 05

Create the directory C:\RubyApps

Install Ruby on Rails on Windows guide 06

CD to C:\RubyApps


rails new my_app

Install Ruby on Rails on Windows guide 07

If you installed the 64 bit version of Ruby, open C:\RubyApps\my_app\Gemfile and replace the tzinfo-data line with:

gem 'tzinfo-data', platforms: [:x64_mingw, :mingw, :mswin]

. Save the file and return to Command Prompt

Install Ruby on Rails on Windows guide 08

CD to C:\RubyApps\my_app


bundle update

Install Ruby on Rails on Windows guide 09

You are now done and can run your Rails server

rails server

Install Ruby on Rails on Windows guide 10

Open up a browser and go to:


Install Ruby on Rails on Windows guide 11

That’s it. Your rails server is running in the Command Prompt window which is handy for development. There are many ways to make Rails run as a Windows Service, in Apache, IIS, etc. Google it if needed. :)

To get started developing your first Ruby application, I highly recommend this guide by Andrea Pavoni.

I found RubyMine by JetBrains to be a very nice IDE for developing Ruby on Rails applications – check it out.


  • Wesley

    Hi! Thank you for your tutorial. I always get the following error message when I try to run the server:

    C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in `require’: cannot load such file — sqlite3/sqlite3_native (LoadError)
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in `rescue in ‘
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:2:in `’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require’
    from c:/RubyApps/my_app/config/application.rb:7:in `’

    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!’
    from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `’
    from bin/rails:4:in `require’
    from bin/rails:4:in `’

    Do you have any idea why this happens and why does it happen to so many gems?

    Thank you!