Ruby on Rails developer with 8 years of experience Skills, Mongodb, Mysql, Json, Jquery etc.,contact me at sathish.thandavan@gmail.com
Rails Installation on Windows:
1. Install Ruby
Download an installation package from rubyinstaller.rubyforge.org.
Follow the download link, and run the resulting installer. We will get RubyGems along with this package.
2. With Ruby Gems loaded, we can install Rails and its dependencies through the command line.
C:\> gem install rails –include-dependencies
We would get the following error:
C:\Ruby>gem install rails –include-dependencies
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
As connecting to the repository gives us a problem here, let us download the required gems locally and do
the installation step by step.
a. Firstly, download Rails gem from the below link. http://rubyforge.org/frs/?group_id=307
Execute the following command to install rails.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:rails requires rake (>= 0.8.3, runtime) This says us that we require rake-0.8.3 gem.
b. Download rake gem from the below link.
http://rubyforge.org/frs/?group_id=50
Execute the following command to install rake.
C:\Ruby>gem install rake-0.8.3.gem
Successfully installed rake-0.8.3
1 gem installed
Installing ri documentation for rake-0.8.3…
Installing RDoc documentation for rake-0.8.3…
Rake gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activesupport (= 2.3.2, runtime)
This says us that we require activesupport-2.3.2 gem.
c. Download activesupport gem from the below link.
http://rubyforge.org/frs/?group_id=570&release_id=32254
Execute the following command to install activesupport.
C:\Ruby>gem install activesupport-2.3.2.gem
Successfully installed activesupport-2.3.2
1 gem installed
Installing ri documentation for activesupport-2.3.2…
Installing RDoc documentation for activesupport-2.3.2…
activesupport gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activerecord (= 2.3.2, runtime)
This says us that we require activerecord-2.3.2 gem.
d. Download activerecord gem from the below link.
http://rubyforge.org/frs/?group_id=182
Execute the following command to install activerecord.
C:\Ruby>gem install activerecord-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed activerecord-2.3.2
1 gem installed
Installing ri documentation for activerecord-2.3.2…
Installing RDoc documentation for activerecord-2.3.2…
activerecord gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires actionpack (= 2.3.2, runtime)
This says us that we require actionpack-2.3.2 gem.
e. Download actionpack gem from the below link.
http://rubyforge.org/frs/?group_id=249
Execute the following command to install actionpack.
C:\Ruby>gem install actionpack-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed actionpack-2.3.2
1 gem installed
Installing ri documentation for actionpack-2.3.2…
Installing RDoc documentation for actionpack-2.3.2…
actionpack gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires actionmailer (= 2.3.2, runtime)
This says us that we require actionmailer-2.3.2 gem.
f. Download actionmailer gem from the below link.
http://rubyforge.org/frs/download.php/53265/actionmailer-2.3.2.gem
Execute the following command to install actionmailer.
C:\Ruby>gem install actionmailer-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed actionmailer-2.3.2
1 gem installed
Installing ri documentation for actionmailer-2.3.2…
Installing RDoc documentation for actionmailer-2.3.2…
actionmailer gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activeresource (= 2.3.2, runtime)
This says us that we require activeresource-2.3.2 gem.
g. Download activeresource gem from the below link.
http://rubyforge.org/frs/?group_id=3507&release_id=22583
Execute the following command to install activeresource.
C:\Ruby>gem install activeresource-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed activeresource-2.3.2
1 gem installed
Installing ri documentation for activeresource-2.3.2…
Installing RDoc documentation for activeresource-2.3.2…
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed rails-2.3.2
1 gem installed
Finally, Rails got successfully installed!!
Installation Verification
We can verify whether everything is setup properly or not.
Use the following command to create a demo project.
This will generate a demo rail project.
C:\Ruby>rails demo
create
create app/controllers
create app/helpers
…………………………………………..
…………………………………………..
create log/development.log
create log/test.log
Now next use the following command to run WEBrick web server on your machine.
C:\Ruby>cd demo
C:\Ruby\demo>ruby script/server
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-04-30 11:02:21] INFO WEBrick 1.3.1
[2009-04-30 11:02:21] INFO ruby 1.8.6 (2008-08-11) [i386-mswin32]
[2009-04-30 11:02:21] INFO WEBrick::HTTPServer#start: pid=3624 port=3000
Now open your browser and type the following address.
http://localhost:3000
If everything is fine then you should have a message something like “Welcome aboard” or “Congratulations“.
Rails Installation on Windows:
1. Install Ruby
Download an installation package from rubyinstaller.rubyforge.org.
Follow the download link, and run the resulting installer. We will get RubyGems along with this package.
2. With Ruby Gems loaded, we can install Rails and its dependencies through the command line.
C:\> gem install rails –include-dependencies
We would get the following error:
C:\Ruby>gem install rails –include-dependencies
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
As connecting to the repository gives us a problem here, let us download the required gems locally and do
the installation step by step.
a. Firstly, download Rails gem from the below link. http://rubyforge.org/frs/?group_id=307
Execute the following command to install rails.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:rails requires rake (>= 0.8.3, runtime) This says us that we require rake-0.8.3 gem.
b. Download rake gem from the below link.
http://rubyforge.org/frs/?group_id=50
Execute the following command to install rake.
C:\Ruby>gem install rake-0.8.3.gem
Successfully installed rake-0.8.3
1 gem installed
Installing ri documentation for rake-0.8.3…
Installing RDoc documentation for rake-0.8.3…
Rake gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activesupport (= 2.3.2, runtime)
This says us that we require activesupport-2.3.2 gem.
c. Download activesupport gem from the below link.
http://rubyforge.org/frs/?group_id=570&release_id=32254
Execute the following command to install activesupport.
C:\Ruby>gem install activesupport-2.3.2.gem
Successfully installed activesupport-2.3.2
1 gem installed
Installing ri documentation for activesupport-2.3.2…
Installing RDoc documentation for activesupport-2.3.2…
activesupport gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activerecord (= 2.3.2, runtime)
This says us that we require activerecord-2.3.2 gem.
d. Download activerecord gem from the below link.
http://rubyforge.org/frs/?group_id=182
Execute the following command to install activerecord.
C:\Ruby>gem install activerecord-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed activerecord-2.3.2
1 gem installed
Installing ri documentation for activerecord-2.3.2…
Installing RDoc documentation for activerecord-2.3.2…
activerecord gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires actionpack (= 2.3.2, runtime)
This says us that we require actionpack-2.3.2 gem.
e. Download actionpack gem from the below link.
http://rubyforge.org/frs/?group_id=249
Execute the following command to install actionpack.
C:\Ruby>gem install actionpack-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed actionpack-2.3.2
1 gem installed
Installing ri documentation for actionpack-2.3.2…
Installing RDoc documentation for actionpack-2.3.2…
actionpack gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires actionmailer (= 2.3.2, runtime)
This says us that we require actionmailer-2.3.2 gem.
f. Download actionmailer gem from the below link.
http://rubyforge.org/frs/download.php/53265/actionmailer-2.3.2.gem
Execute the following command to install actionmailer.
C:\Ruby>gem install actionmailer-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed actionmailer-2.3.2
1 gem installed
Installing ri documentation for actionmailer-2.3.2…
Installing RDoc documentation for actionmailer-2.3.2…
actionmailer gem got successfully installed.
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rails-2.3.2.gem:
rails requires activeresource (= 2.3.2, runtime)
This says us that we require activeresource-2.3.2 gem.
g. Download activeresource gem from the below link.
http://rubyforge.org/frs/?group_id=3507&release_id=22583
Execute the following command to install activeresource.
C:\Ruby>gem install activeresource-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed activeresource-2.3.2
1 gem installed
Installing ri documentation for activeresource-2.3.2…
Installing RDoc documentation for activeresource-2.3.2…
Execute the command to install rails again.
C:\Ruby>gem install rails-2.3.2.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed rails-2.3.2
1 gem installed
Finally, Rails got successfully installed!!
Installation Verification
We can verify whether everything is setup properly or not.
Use the following command to create a demo project.
This will generate a demo rail project.
C:\Ruby>rails demo
create
create app/controllers
create app/helpers
…………………………………………..
…………………………………………..
create log/development.log
create log/test.log
Now next use the following command to run WEBrick web server on your machine.
C:\Ruby>cd demo
C:\Ruby\demo>ruby script/server
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-04-30 11:02:21] INFO WEBrick 1.3.1
[2009-04-30 11:02:21] INFO ruby 1.8.6 (2008-08-11) [i386-mswin32]
[2009-04-30 11:02:21] INFO WEBrick::HTTPServer#start: pid=3624 port=3000
Now open your browser and type the following address.
http://localhost:3000
If everything is fine then you should have a message something like “Welcome aboard” or “Congratulations“.
3 comments:
hi
Dai, What is this?
Installation steps for Ruby on Rails
Post a Comment