Monday, August 14, 2006

Preparing to Roll with Ruby on Rails: How to Install and Develop Ruby on Rails Applications

Before you can actually star developing the applications in Ruby on Rails, you need to install the software. If you would like to see why you need to install this software, please get needy by reading this article Time to Get On Rails with Ruby first. Now after reading the article, are interested to try something hands on? If yes, then let's go ahead and install the software as follows:

Note: I am primarily a Windows User and therefore I would describe the installation process for the Windows PC :-) Although as much as I know, the installation is not any different on the Macintosh and Linux systems also. But still I would recommend the non-Windows users to search for some other installation process if available on internet rather than following the steps mentioned here.

To develop any web application in Ruby on rails, you typically would require installing the following software:

  • Ruby
  • Rails Framework
  • MySQL Database
  • MySQL Client (Optional if you prefer using the command line to manage the DB)

Installing Ruby:

  1. Download the latest One-Click Ruby Installer for Windows.
  2. Execute the executable file and follow the installation instructions to install Ruby successfully.

That’s it. You are done with Ruby. How simple see :-)

Note: The Linux and OS X users would also need to install the RubyGems package. But windows users need not worry as the above windows Ruby installer has RubyGems package manager installed already. The RubyGems package will be required to install Rails framework in the next step.

Installing Rails: Using RubyGems

  1. Open a command window (Start -> Run -> cmd) and run the command following command: gem install rails --remote
  2. Type "y" in response to each of the questions prompted at the command prompt. The questions are regarding installing the libraries that Rails requires or depend on.

Installing MySQL DB:

  1. Download MySQL DB using the MySQL Windows Installer.
  2. Execute the installer by double-clicking it.
  3. Accept the default installation by accepting the default installation options (in case you do not require anything specific settings). You would be asked to signing up for a mysql.com account also during this installation. You may skip that.
  4. At last of the installation wizard, click Finish to complete installation and start the configuration wizard.
  5. Accept all the defaults settings while configuring the MySQL DB.
  6. While configuring the Security options, uncheck the "Modify Security Settings" checkbox.

Note: You need to perform the Step 6 only if you are installing MySQL DB version 4.1.7 or higher because this would be required for you to be able to access MySQL DB without a password.

Installing MySQL Client (SQLFront): I will use SQLFront to develop the database required in the Rails application later. This is paid software; but a trial version is available for you for 30 days. However, if you are comfortable using the command line you can skip this step.

  1. Download SQLFront version 3.2
  2. Execute the downloaded file by double-clicking it.
  3. Accept all the default settings (unless you require some specific settings).

That's all. You are done with preparations required to kickstart the Ruby on Rails web application development.... :-)

In the next post, I would give a small example on "How to Develop with Ruby on Rails". Till then "Happy Reading and Happy Programming :-) "

1 comment:

Anonymous said...

NSU - 4efer, 5210 - rulez