Friday, December 22, 2006

Intermediate::Rails

Rails is the M-V-C ( Model - View - Controller ) open-source framework written in Ruby, it is also called as Ruby on Rails(RoR). It is for developing database web applications.







Rails Installation



  • Ruby must be installed for rails installation.


  • Check for gem installation by typing gem --version in a command window.


  • Now we will use RubyGems to install Rails.



      Check whether your internet connection is active.

    In a command window, type gem install rails --include-dependencies


  • Now you are ready to run rails(RoR).


  • To update your rails application, simply type gem update rails in command window. This will automatically update your rails installation.




  • Getting Started with a New Rails Application




    1. Create new Rails application by the command rails , like c:\>rails demo

    2. This will automatically create rails application name ‘demo’ with standard directory structure.

    3. Change directory to c:\>cd demo, then Start WEBrick server by the command c:\demo>ruby script/server . Then access http://localhost:3000/ in the browser, you should see a screen that looks like this.



    4. This confirms that the installation was successful and Rails is running.

    0 Comments:

    Post a Comment

    Subscribe to Post Comments [Atom]

    << Home