Saturday, April 23, 2011

HOW TO INSTALL RAILS IN WINDOWS XP

you should have internet connection
After the installation of RUBY from previous post Follow some steps
set the ENVIRONMENT VARIABLE PATH OF RUBY
Download "rubygem-1.3.4.zip" or any version from given link:

rubygems



Extract rubygem .zip file and putt it in System Directory(C)
After that open CMD and go into "rubygem-1.3.4" directory Or what ever rubygem version you downloaded

C:\cd rubygems-1.3.4 press enter
C:\rubygems-1.3.4>ruby setup.rb press enter
Installing RubyGems
Installing gem executable
Removing old source_cache files
Removing old RubyGems RDoc and ri
Installing rubygems-1.3.4 ri into c:/ruby/lib/ruby/gems/1.8/doc/rubygems-1.3.4/r
i
Installing rubygems-1.3.4 rdoc into c:/ruby/lib/ruby/gems/1.8/doc/rubygems-1.3.4
/rdoc

------------------------------------------------------------------------------

Oh-no! Unable to find release notes!

------------------------------------------------------------------------------

RubyGems installed the following executables:
c:/ruby/bin/gem

After that type(in C directory )
C:\>gem install rails --version 2.3.2 --include-dependencies press enter

If you have a proxy internet connection then you will find an error
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: could not find gem rails locally or in a repository

then type
C:\>SET HTTP_PROXY=http://USERNAME:PASS@HOST:PORT press enter
For example
C:\>SET HTTP_PROXY=http://ANDY8286:HELLO@172.25.5.6:3128
where PORT=3128
USERNAME=ANDY8286
PASSWORD=HELLO
HOST=172.25.5.6
AND THEN TYPE(you can choose a version which is available)
C:\>gem install rails --version 2.3.2 --include-dependencies press enter

then you will find messages(it will take few minutes)
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.2
Successfully installed activerecord-2.3.2
Successfully installed actionpack-2.3.2
Successfully installed actionmailer-2.3.2
Successfully installed activeresource-2.3.2
Successfully installed rails-2.3.2
7 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.2
'.
.
.
.



then follow these steps to create a directory
c:\> mkdir rails_apps press enter
c:\> cd rails_apps press enter
c:\rails_apps> cd demo press enter
c:\rails_apps>demo>ruby script\server press enter

your server will started.........

just open IE and type :http://localhost:3000


AND ENJOY RUBY ON RAILS ........