Ruby on Rails

What is Ruby on Rails?

The Ruby on Rails phenomenon is sweeping through our industry with reckless disregard for established programming languages, longstanding conventions, or commercial support.

But what is Ruby on Rails? Rails is a full-stack (Rails includes everything you need: Model-View-Controller, O/RM, unit testing, and build and deployment automation. Because everything is tightly integrated, it is ridiculously easy to get started), 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. Rails makes it easier to develop, deploy and maintain web applications. Also, Rails has become the framework of choice for the implementation of a wide-range of Web 2.0 applications.

Rails Installation

To install Ruby on Rails on Windows, we need to do the following:

  1. Install Ruby 1.8.6 (which we have already done).
  2. Check whether you have RubyGems installed by typing gem --version in a command window. We should have this too.
  3. 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
  4. Congratulations! You are now on Rails.
  5. 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 comes with a built-in driver (written in pure Ruby) for MySQL databases. We shall use MySQL 5.0.27 and the installation instructions are in the file mysqlsetup.doc.

Talking in depth about Ruby on Rails is beyond the scope of the Ruby Study Notes here. The following resources would help you get started on Rails.