Installation of Ruby on Rails on Windows

The most convenient way to install the Rails stack is via downloading the Rails Installer.
Download the Rails Installer kit from http://railsinstaller.org/

Packages included are:
Ruby 1.8.7
Rails 3.0.6
Git 1.7.3.1
Sqlite 3.7.3
DevKit

The file to be downloaded is railsinstaller-1.1.1.exe (47Mb).

After downloading, just run the exe file and change the default installation path when needed:

 

Post installation update
After installing, you can update the components via the Gems package which is installed as well:

c:\>gem update --system
Updating rubygems-update
Fetching: rubygems-update-1.7.2.gem (100%)
Successfully installed rubygems-update-1.7.2
Installing RubyGems 1.7.2
RubyGems 1.7.2 installed

c:\>gem update
Updating installed gems
Updating actionmailer
Fetching: activesupport-3.0.7.gem (100%)
Fetching: activemodel-3.0.7.gem (100%)
Fetching: actionpack-3.0.7.gem (100%)
Fetching: actionmailer-3.0.7.gem (100%)
Successfully installed activesupport-3.0.7
Successfully installed activemodel-3.0.7
Successfully installed actionpack-3.0.7
Successfully installed actionmailer-3.0.7
Updating activerecord
Fetching: activerecord-3.0.7.gem (100%)
Successfully installed activerecord-3.0.7
Updating activeresource
Fetching: activeresource-3.0.7.gem (100%)
Successfully installed activeresource-3.0.7
Updating builder
Fetching: builder-3.0.0.gem (100%)
Successfully installed builder-3.0.0
Updating erubis
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Updating mail
Fetching: mail-2.2.17.gem (100%)
Successfully installed mail-2.2.17
Updating pg
Fetching: pg-0.11.0-x86-mingw32.gem (100%)
Successfully installed pg-0.11.0-x86-mingw32
Updating rack-mount
Fetching: rack-mount-0.7.2.gem (100%)
Successfully installed rack-mount-0.7.2
Updating rails
Fetching: railties-3.0.7.gem (100%)
Fetching: rails-3.0.7.gem (100%)
Successfully installed railties-3.0.7
Successfully installed rails-3.0.7
Gems updated: activesupport, activemodel, actionpack, actionmailer, activerecord
, activeresource, builder, erubis, mail, pg, rack-mount, railties, rails
Installing ri documentation for activesupport-3.0.7...
Installing ri documentation for activemodel-3.0.7...
Installing ri documentation for actionpack-3.0.7...
Installing ri documentation for actionmailer-3.0.7...
Installing ri documentation for activerecord-3.0.7...

Check if everything works….

The install package has created a site directory, for example on c:\sites\sample

Now, change to the sample directory and start the built in webserver:

c:
c:\>cd\sites\sample
c:\sites\sample>ruby script/rails server

=> Booting WEBrick
=> Rails 3.0.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-04-23 19:02:15] INFO WEBrick 1.3.1
[2011-04-23 19:02:15] INFO ruby 1.8.7 (2011-02-18) [i386-mingw32]
[2011-04-23 19:02:15] INFO WEBrick::HTTPServer#start: pid=5464 port=3000

Startup your browser and type

http://localhost:3000

You will see the following result (after pressing the link About your application’s environment):

That’s all about the installation.

One thought on “Installation of Ruby on Rails on Windows

Comments are closed.