/**
*    @Author: Arash Karimzadeh
*    @Email:
*    @Desciption: Here, I post some of my recent
*    researches. Also you can see my code projects.
*/  
Ajax C # Chrome CMS dateNet Design Patterns includeMany JavaScript jBind Joomla jQuery Plugin rails ror RubyOnRails SQLite xul

+ All tags

Content View Hits : 344237
Bookmark and Share
How to Install Ruby on Rails on Windows PDF Print
Written by Arash Karimzadeh   
Saturday, 16 May 2009 15:05

This article shows how easily you can install RoR on windows xp. Using RubyInstaller. I am using windows xp and I installed MySQL previously which I wont talk about right now. Lets start.

1.Get the RubyInstaller

The latest version at this moment is 1.8.6-26 Final (2007-12-14) . Download it and run t. it is going to extract some files by default in c:\ruby which is ok for me. This Installer is going to copy some stuff:

  1. ruby
  2. a ruby book ProgrammingRuby.chm in your c:\ruby\doc folder
  3. gem ruby plugin manager
  4. scite an opensource IDE for ruby

2.Check what you just installed

After you run the exe file. You must have folder named ruby (mine is located in c:\ruby). check it. Check the ReleaseNotes.txt as you see there are some useful information.

for example mine has:

ruby-mswin32        ruby-1.8.6-p111
RubyGems            0.9.4
Rake                0.7.3
RubySrc             1.8.6-p111
SciTE               1.72

You can also check your ruby version by running this command in your command prompt:

ruby -v

and also check gem version by:

gem -v

3.Installing rails

Now it is time to install rails by using this command at your command prompt:

gem install rails --include-dependencies

It will take some seconds-minutes to start the installation.

Now check your rails version by

rails -v

4.Create first project

I'm going to create my first project in drive D by this command:

rails firstApp

It will create some files and folders. Which helps you to code and organize your file in rails format.Lets see what we just did!

5.Start the web server

You can start it by typing this command in your project folder which is now firstApp.

ruby script/server

As you see mine has a little problem.Which caused by not updating my gem.

Lets update the gem by:

gem update --system

After updating, lets try to start the server again.

ruby script/server

Yes! It's working fine. Now you can check your application at this address http://localhost:3000. You will see the rails welcome page.

6.Install MySQL

There is no need to start talking about MySQL. You can get the latest MySQL installer from its website and the wizard will do the rest of the things. ;)

After installing mysql, you must install ruby mysql library by:

gem install mysql

Tags: RubyOnRails

Last Updated on Saturday, 16 May 2009 15:24