Tuesday, January 15

Ruby on Rails - Installing Rails

Recently my laptop crashed as the virus invaded to each and every folder possible. I could not open any of local folders, files and also not able to access the internet. I was so fed up, without second thought I just reformatted my system. Of course, later I realized the value of backup, when I was going through the installations.
Adding to this when I tried to install rails through "gem install rails --include-dependencies". It was annoying message, which said the request to remote server timed out!

Well I was just discussing with my juniors what exactly rails consists/made of?
Rails is nothing but Web-application framework with template engine, control-flow layer, and ORM.
I also explained that they are nothing but few ruby files called/named as gems.
activeresource, rails, activesupport, activerecord, actionpack,
I recollected that, and instead of depending on net connection speed, went to ruby forge and picked up all the above gems (latest version 2.0.2) and stored on to local folders. Then installed one by one in the order... (click the links to download)
  1. activeresource 2.0.2
  2. rails 2.0.2
  3. activesupport 2.0.2
  4. activerecord 2.0.2
  5. actionpack 2.0.2
  6. actionmailer 2.0.2
Download the archive.
Note: The order is maintained based on the dependencies the other
So this is what downloaded/installed when you run the command "gem install rails --include-dependencies".


Though each of the above listed gems could become a topic by itself, let me brief what's the role each of them got to play:
  • activeresource - Think Active Record for web resources.
  • rails - Web-application framework with template engine, control-flow layer, and ORM.
  • activesupport - Support and utility classes used by the Rails framework.
  • activerecord - Implements the ActiveRecord pattern for ORM.
  • actionpack - Web-flow and rendering framework putting the VC (Views & Controllers) in MVC
  • actionmailer - Service layer for easy email delivery and testing.
The embedded image shows the list of gems that will be installed, when you install ruby, rails.

Thanks to my friend Manoj for the screenshot.
Cross check:
  1. ruby -v => To check the version of ruby installed
  2. gem -v => To check the version of gems installed
  3. rails -v => To check the version of rails installed
  4. gemlist => To find the list of all gems installed

No comments: