Sunday, July 02, 2006

Ruby on Rails Installation

Armed with the elementary knowledge of Ruby gained so far, I am now going to explore Ruby on Rails. Rails is a full-stack, open-source web framework (support structure) in Ruby, that closely follows the Model View Controller (MVC) architecture for writing real-world applications (Rails applications are written in Ruby) with less code and no cumbersome XML configuration files. Simply put, Rails is an open source Ruby framework for developing database-backed web applications.

To install Ruby on Rails on Windows, we need to do the following:
  • Install Ruby 1.8.2 which we have already done.
  • Check whether you have RubyGems installed by typing gem --version in a command window. We should have this too.
  • Now we'll use RubyGems to install Rails and a few things that Rails needs. Ensure that your internet connection is active. In a command window, type gem install rails --include-dependencies
    Congratulations! You are now on Rails.
  • There's one more step you have to perform before you can start development. Rails works with DB2, MySQL, Oracle, Postgres, SQL Server and SQLite databases. For all but MySQL, you will need to install a database driver, a library that Rails can use to connect to and use your database engine. Rails come with a built-in driver (written in pure Ruby) for MySQL databases. We shall use MySQL 4.1.8 and the installation instructions are in the file mysqlsetup.doc.
  • To update our Rails is simple. In a Command window type: gem update rails RubyGems will automatically update your Rails installation.

I would like all the 42 participants to comment on this post, after they have installed Rails.

First Post | Previous | Next

Technorati Tags:
Blogs linking to this article


Anonymous Aníbal Rojas said...

I would recommend to use Ruby 1.8.4, latest Rails versions won't run on 1.8.3 and there is some cool stuff, like Mongrel requring 1.8.4 instead of 1.8.2. Off Topic: Please feel free to register at, a meeting place for people interested in the Ruby Programming Language or any of the related technologies.

8:20 PM  
Blogger Eswar Malla said...

i am facing problems with my installation of rails. The command prompt just stays dumb without any progress. Could anyone help with this problem ??

12:10 PM  
Blogger SatishTalim said...

Eswar, a little more details of the steps you are doing etc. would help. Also, what's your computer's environment?

12:12 PM  
Blogger sandip said...

I have successfully installed rails, Mysql server and mysql front.

2:38 PM  
Blogger Scot Gardner said...

Installed and running here on OSX.

5:53 PM  
Blogger Gaurav V Bagga said...

Yes i have done all the necessary setups

9:35 PM  
Blogger Jatinder Singh said...

Rails and My-SQL installed successfully.

9:59 PM  
Blogger Ashish Kulkarni said...

Hi Satish,

I have been using PostgreSQL a lot and would like to stick with it.

The main reason for that is that for commercial use, MySQL is not free. Whereas, PostgreSQL is free for both development as well as commercial use.

I hope you don't mind.

I have got it all installed and ready to go.

Eswar, if you are behind a firewall, then the rails installation will not kick off. You can find a one-click installation containing everything - Ruby, Rails, etc. You can use that one.

1:50 AM  
Blogger Anil said...

Successfully installed rails, Mysql server and mysql front.

7:18 AM  
Blogger raj said...

So my sweet Ruby is ready to travel through Rails.Thank you sir for prvoiding specific versions of ruby n rails or else it would be a great confusion as there are huge number of releases of ROR.

12:32 PM  
Blogger शंतनु said...

Installation in working condition.

12:46 PM  
Blogger Smita Deshpande said...

Getting the following error message:
C:\ruby\bin>gem install rails --include-dependencies
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
ERROR: While executing gem ... (Errno::EBADF)
Bad file descriptor - connect(2)

12:39 PM  
Blogger SatishTalim said...

Smita, you need an internet connection while doing this? Were you connected? If yes, do you have a firewall - disable it before running the command.

12:42 PM  
Blogger Gaurav V Bagga said...


i have been hearing a lot of book "Agile Web Development With Rails" ,how to get this book for free as buying it in $$$ does not seems viable

any suggestions!

what can be done......

1:39 PM  
Blogger Smita Deshpande said...

Installed rails successfully

6:44 PM  
Blogger Vasudev said...

I have installed Rails (Instant Rails) earlier.

5:24 PM  
Blogger DeepaliAhirrao said...

Installed Rails successfully

5:46 PM  
Blogger Anish Betawadkar said...

Done with the installation

12:06 PM  
Blogger Anish Betawadkar said...

Just a small change.

Link to mySQLsetup.doc should point to

instead of

3:10 PM  
Blogger SatishTalim said...

Thanks Anish. The link has been corrected.

6:50 PM  
Blogger Lhutfhy Pribadi said...

gem install rails -r -p http://localhost:8080 -y
ERROR: While executing gem ... (Errno::EBADF)
Bad file descriptor - connect(2)

I don't have any active firewall, but I connect internet through a proxy server.

maybe ruby ain't good for me. Bad first impression

9:08 AM  
Anonymous Ghalaad said...

i've tried and successfully used this :
gem install rails -include-dependencies --http-proxy http://yourproxy:yourproxysport

3:11 AM  
Blogger Reny said...

if doesn't work the option "remote" with the command "gem" in Windows enviroment try this:
set http_proxy=http://your_proxy:proxy_port

10:34 PM  
Anonymous varunk23 said...

Reny, that worked!
Thanks :)

11:19 AM  
Anonymous Onno said...

Installing Rails is without a single doubt the most trial and error a process can get.

I got burned by the proxy problems (and other problems) and used the set http_proxy workaround only to get burned once more:

gem update rails
Updating installed gems...
Attempting remote update of rails
Install required dependency activesupport? [Yn]
Install required dependency activerecord? [Yn]
ERROR: While executing gem ... (Zlib::BufError)
buffer error

2:24 PM  

Post a Comment

Links to this post:

Create a Link

<< Home