0
-Rails is a web-application and persistence framework that includes everything
0
-needed to create database-backed web-applications according to the
0
-Model-View-Control pattern of separation. This pattern splits the view (also
0
-called the presentation) into "dumb" templates that are primarily responsible
0
-for inserting pre-built data in between HTML tags. The model contains the
0
-"smart" domain objects (such as Account, Product, Person, Post) that holds all
0
-the business logic and knows how to persist themselves to a database. The
0
-controller handles the incoming requests (such as Save New Account, Update
0
-Product, Show Post) by manipulating the model and directing data to the view.
0
+Rails is a web-application framework that includes everything needed to create
0
+database-backed web applications according to the Model-View-Control pattern.
0
+This pattern splits the view (also called the presentation) into "dumb" templates
0
+that are primarily responsible for inserting pre-built data in between HTML tags.
0
+The model contains the "smart" domain objects (such as Account, Product, Person,
0
+Post) that holds all the business logic and knows how to persist themselves to
0
+a database. The controller handles the incoming requests (such as Save New Account,
0
+Update Product, Show Post) by manipulating the model and directing data to the view.
0
In Rails, the model is handled by what's called an object-relational mapping
0
layer entitled Active Record. This layer allows you to present the data from
0
@@ -29,7 +29,6 @@ link:files/vendor/rails/actionpack/README.html.
0
1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
0
and your application name. Ex: rails myapp
0
- (If you've downloaded Rails in a complete tgz or zip, this step is already done)
0
2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
0
3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
0
4. Follow the guidelines to start developing your application
0
@@ -62,6 +61,50 @@ Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
0
please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
0
+== Apache .htaccess example
0
+# General Apache options
0
+AddHandler fastcgi-script .fcgi
0
+AddHandler cgi-script .cgi
0
+Options +FollowSymLinks +ExecCGI
0
+# If you don't want Rails to look in certain directories,
0
+# use the following rewrite rules so that Apache won't rewrite certain requests
0
+# RewriteCond %{REQUEST_URI} ^/notrails.*
0
+# Redirect all requests not available on the filesystem to Rails
0
+# By default the cgi dispatcher is used which is very slow
0
+# For better performance replace the dispatcher with the fastcgi one
0
+# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
0
+# If your Rails application is accessed via an Alias directive,
0
+# then you MUST also set the RewriteBase in this htaccess file.
0
+# Alias /myrailsapp /path/to/myrailsapp/public
0
+# RewriteBase /myrailsapp
0
+RewriteRule ^$ index.html [QSA]
0
+RewriteRule ^([^.]+)$ $1.html [QSA]
0
+RewriteCond %{REQUEST_FILENAME} !-f
0
+RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
0
+# In case Rails experiences terminal errors
0
+# Instead of displaying this message you can supply a file here which will be rendered instead
0
+# ErrorDocument 500 /500.html
0
+ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
0
Sometimes your application goes wrong. Fortunately there are a lot of tools that
Comments
No one has commented yet.