A bit about Rails
So, what is Rails, anyway? Rails is a Web applications platform built on top of the Ruby programming language. Ruby has been around for about 10 years. Like Perl and Python, it's an open source, agile programming language that offers full support for object-oriented programming.
Rails is an applications framework that emphasizes proper Web application patterns, such Model-View-Controller (MVC). In this case, the Model portion of the system is generally represented by a set of ActiveRecord objects that map to the tables in a database. The Controller portion is a Ruby class with methods for each of the various operations to perform on the model. And the View is typically Hypertext Markup Language (HTML) code generated through an ERB template (ERB is Ruby's built-in text templating package), which feels similar in form to PHP or JavaServer Pages (JSP) code. Views can also be Extensible Markup Language (XML) code, text, JavaScript code, images, or whatever you like.
When a user requests a page from a Rails Web application, the URL is sent through a routing system, which sends the request to a controller. The controller requests data from the model and sends it to the view for formatting.
When you create a Rails application, the system automatically generates a set of directories and starting files. There are directories for the JavaScript files that come with the system (including the Prototype.js library); directories for the views, models, and controllers; and even a location for plug-ins that you can download from other developers.