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

19 Comments:

Anonymous Anonymous 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 RubyCorner.com, a meeting place for people interested in the Ruby Programming Language or any of the related technologies.

8:20 PM  
Blogger eswar 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 Unknown 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 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 शंतनू said...

Installation in working condition.

12:46 PM  
Blogger Unknown 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...

hi,

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 Vasudev Ram said...

I have installed Rails (Instant Rails) earlier.

5:24 PM  
Blogger Aspirations said...

Done with the installation

12:06 PM  
Blogger Aspirations said...

Just a small change.

Link to mySQLsetup.doc should point to http://www.esnips.com/web/RailsPrograms

instead of http://www.esnips.com/web/RubyPrograms

3:10 PM  
Blogger Unknown 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 Anonymous said...

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

3:11 AM  
Blogger Reny Alvarado 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 Anonymous said...

Reny, that worked!
Thanks :)

11:19 AM  
Anonymous Anonymous 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

<< Home