Ruby on rails installation on Windows

by Noman Muhammad

a. First, let's check to see if you already have Ruby installed. Bring up a command prompt and and type ruby -v. If Ruby responds, and if it shows a version number at or above 1.8.2 then type gem --version. If you don.t get an error, skip to step 3. Otherwise, we.ll install a fresh Ruby.
b. If Ruby is not installed, then download an installation package from rubyinstaller.rubyforge.org. Follow the download link, and run the resulting installer. This is an exe like ruby186-25.exe and will be installed in a single click. You may as well install everything . It's a very small package, and you'll get RubyGems as well alongwith this package. Please check Release Notes for more detail.
c. With RubyGems loaded, you can install all of Rails and its dependencies through the command line:

C:\> gem install rails --include-dependencies
Keeping Rails Up-to-Date:
Assuming you installed Rails using RubyGems, keeping up-to-date is relatively easy. Issue the following command:
C:\> gem update rails
This will automatically update your Rails installation. The next time you restart your application it will pick up this latest version of Rails. While giving this command, make sure you are connected to the internet.

Installation Verification
You can verify if everything is setup according to your requirements or not. Use the following command to create a demo project.
C:\> rails demo
This will generate a demo rail project, we will discuss about it later. Currently we have to check if envrionment is setup or not. Now next use the following command to run WEBrick web server on your machine.

C:\> cd demo
C:\demo> ruby script/server
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-02-26 09:16:43] INFO WEBrick 1.3.1
[2007-02-26 09:16:43] INFO ruby 1.8.2 (2004-08-24)...
[2007-02-26 09:16:43] INFO WEBrick::HTTPServer-start:pid=2836...
....
Now open your browser and type the following address text box.
http://localhost:3000

This entry was posted on Monday, February 09, 2009 and is filed under , . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

0 comments