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:
- Rails Framework
- MySQL Database
- MySQL Client (Optional if you prefer using the command line to manage the DB)
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
- Open a command window (Start -> Run -> cmd) and run the command following command: gem install rails --remote
- 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:
- Download MySQL DB using the MySQL Windows Installer.
- Execute the installer by double-clicking it.
- 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.
- At last of the installation wizard, click Finish to complete installation and start the configuration wizard.
- Accept all the defaults settings while configuring the MySQL DB.
- 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.
- Download SQLFront version 3.2
- Execute the downloaded file by double-clicking it.
- 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 :-) "