Ruby-on-Rails
  Home arrow Ruby-on-Rails arrow Page 3 - Ruby: Modules, Mixins, Fixins, and Rails
IBM developerWorks
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
RUBY-ON-RAILS

Ruby: Modules, Mixins, Fixins, and Rails
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-04-21

    Table of Contents:
  • Ruby: Modules, Mixins, Fixins, and Rails
  • A Few Notes
  • Going off the Rails of the Crazy Train
  • Controlling the Situation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th -1:00PM EST. Register Today!

    Ruby: Modules, Mixins, Fixins, and Rails - Going off the Rails of the Crazy Train


    (Page 3 of 4 )

    So far in my series of Ruby On Rails tutorials we've only touched upon Ruby (outside of installation at any rate). In the next few tutorials, we will be using Rails and learning the basics of web development with it.

    Whereas Ruby is a programming language, Rails is more of a framework that uses Ruby to do its evil bidding, namely web application building. One of the primary functions of Rails is to build a skeleton application (with default information so there is no need to configure everything).

    You should already have a directory created called “ruby.” If you don't, however, then type the following into your command prompt:


    >md ruby

    >cd ruby

    Next we need to create the framework for our application. To do this, all you type in is rails followed by the name of your application. For this example we will type in: rails myfirsttime.

    After you type this, your command prompt will go a little nuts, creating four billion files, as show below:

    If you take a second and go to the directory where your Ruby is installed, you should see a folder named myfirsttime (unless you named your first rails application something else, in which case whatever you named it will be the folder name).

    If you double-click onto that folder you should see something like this:


    Inside of that folder you will notice a read-me file. If you open it, it will explain what each folder is used for. It isn't necessary to learn everything right this moment. Just be aware that the option is available to you.

    To start the myfirsttime application, make sure you are in the myfirsttimedirectory:


    >cd myfirsttime (note: do not type the “>”)


    Next type:


    >ruby script/server

    The WEBrick will boot and you will see that your application has started on http://0.0.0.:3000. Go ahead and open up a web browser and type http://localhost:3000/ into your URL bar.

    To end your WEBrick session press CTRL-C.

    Now try going back to http://localhost:3000. It doesn't work right? That's because we ended the WEBrick session.

    More Ruby-on-Rails Articles
    More By James Payne


       · Thanks for stopping by. In this article we discuss how to work with Mixins and...
     

    RUBY-ON-RAILS ARTICLES

    - Ruby On Rails: Making Your First Dynamic Site
    - Ruby on Rails: Beginning Rails
    - Ruby: Modules, Mixins, Fixins, and Rails
    - Controlling Information Access with the Rail...
    - URLs, Filters and the Rails Action Controller
    - Flash and the Rails Action Controller
    - Rails Action Controller
    - Dropping and Sorting with AJAX and script.ac...
    - Drag and Drop with script.aculo.us and Rails
    - Introducing script.aculo.us
    - Ruby Classes and Objects
    - Ruby Loops
    - Ruby Conditionals
    - Ruby Operators and Arrays
    - Ruby for the Newbie


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway