Thursday, March 08, 2007

Install Ruby on Rails on Windows - Step by Step

Updated install instructions, as on 15th June 2007:
Updated Install instructions (5.18 KB) can be downloaded here. These modified instructions may be used in lieu of instructions found in "Step_by_step_RoR_Install_For_Windows.txt" and the original instructions.

Original instructions below:
Download the ruby pack from the link here

rubyInstall.zip (29.69 MB)

Unzip the package in a directory of your choice.

The following files are part of the package:
Step_by_step_RoR_Install_For_Windows.txt
rubyInstall <dir>
rubygems-0.9.2.zip
ruport-0.8.11.zip
ruby185-24.exe
standaloneInstall <dir containing all dependent packages of Rails>

Now, install Ruby, by double-clicking on the "ruby185-24.exe" file.

Next, gems needs to be installed.

Create a directory C:\Ruby\Src\ as
shell> md C:\Ruby\Src
Extract the "rubygems-0.9.2.zip" file in the "C:\Ruby\Src\" directory.
Now, the gems package is extracted in the directory "C:\Ruby\Src\rubygems-0.9.2"

Next, copy the directory standaloneInstall to "C:\Ruby\Src\"
[You will have a new directory C:\Ruby\Src\standaloneInstall]

Click on "Start", "Run"
Type "Cmd" in the text area and click on "OK"

The shell command prompt is displayed like "C:\Windows>" which is represented in this document as "shell>"

Here, enter the commands as below.

shell> cd C:\Ruby\Src\rubygems-0.9.2
shell> ruby setup.rb
[gems will be installed]

Next, Rails has to be installed.

Rails installation is dependent on the following modules:
1. Activesupport - http://rubyforge.org/projects/activesupport/
2. Actionpack - http://rubyforge.org/projects/actionpack/
3. Actionmailer - http://rubyforge.org/projects/actionmailer/
4. Activerecord - http://rubyforge.org/projects/activerecord/
5. Actionwebservice - http://rubyforge.org/projects/aws/
6. Rake - http://rubyforge.org/projects/rake/
7. Rails - http://rubyforge.org/projects/rails/

Follow the commands below to install rails.

shell> cd C:\Ruby\Src\standaloneInstall

shell> gem install Activesupport
shell> gem install Actionpack
shell> gem install Actionmailer
shell> gem install Activerecord
shell> gem install Actionwebservice
shell> gem install Rake
shell> gem install Rails

Congratulations! You have now successfully installed Ruby and Rails.

Note: In this installation, MySQL was already installed.

**************************************************
See below for the commands and the response from the computer:
**************************************************
shell> gem install Activesupport
Successfully installed activesupport, version 1.4.1
Installing ri documentation for activesupport-1.4.1...
Installing RDoc documentation for activesupport-1.4.1...

shell> mkdir C:\ruby\src\standaloneInstall
[extract]

C:\ruby\src\standaloneInstall>

shell> gem install Actionpack
Successfully installed actionpack, version 1.13.2
Installing ri documentation for actionpack-1.13.2...
Installing RDoc documentation for actionpack-1.13.2...

shell> gem install Actionmailer
Successfully installed actionmailer, version 1.3.2
Installing ri documentation for actionmailer-1.3.2...
Installing RDoc documentation for actionmailer-1.3.2...

shell> gem install Activerecord
Successfully installed activerecord, version 1.15.2
Installing ri documentation for activerecord-1.15.2...
Installing RDoc documentation for activerecord-1.15.2..

shell> gem install Actionwebservice
Successfully installed actionwebservice, version 1.2.2
Installing ri documentation for actionwebservice-1.2.2...
Installing RDoc documentation for actionwebservice-1.2.2...

shell> gem install Rake
Successfully installed rake, version 0.7.2
Installing ri documentation for rake-0.7.2...
Installing RDoc documentation for rake-0.7.2...

shell> gem install Rails
Successfully installed rails, version 1.2.2

**************************************************
To install Ruport [Ruby Report]

extract "ruport-0.8.11.zip" to "C:\Ruby\Src"
You will now have the package extracted to
C:\Ruby\Src\ruport-0.8.11

Enter the commands below to install Ruby Reports.

shell> cd C:\Ruby\Src\ruport-0.8.11
shell> ruby setup.rb

The installer will respond with some information regarding the install and the shell prompt is seen
indicating that Ruby Reports was successfully installed.

**************************************************

2 comments:

Gregory Brown said...

Hi,

No need to use setup.rb for Ruport

In fact, you can install rails and ruport in two lines! :)


gem install rails -y
gem install ruport -y


Warm regards,
Gregory

Prem said...

Hi Gregory,

Thanks for the information.

But, this set of instructions is for offline installation. The zip file for which the link is available, contains all relevant files which will be unzipped before "gem" is used for install.

I have not tried your two line installation method. Will try and update with my comments.

Thanks for your comment.

God Bless!

Knee Jerk Governance ?!

A Country of RULES I do not know how many of you have noticed.  We are a country of RULES, RULES & more RULES. Probably the only...

Copyrighted.com Registered & Protected DWYE-NHTO-NBNH-7FFM