aboutsummaryrefslogtreecommitdiffstats
path: root/railties/README
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-07-25 16:03:58 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-07-25 16:03:58 +0100
commite033b5d037c303a34e0c5aec2b38ec6270f00f86 (patch)
tree7c69e6ef81028d0c1978d0b1dcea14893a146554 /railties/README
parent0c68d23f19010379a9320690ca17a26743c8f071 (diff)
downloadrails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.tar.gz
rails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.tar.bz2
rails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.zip
Merge docrails
Diffstat (limited to 'railties/README')
-rw-r--r--railties/README91
1 files changed, 45 insertions, 46 deletions
diff --git a/railties/README b/railties/README
index 37ec8ea211..221e8486d1 100644
--- a/railties/README
+++ b/railties/README
@@ -28,7 +28,7 @@ link:files/vendor/rails/actionpack/README.html.
== Getting Started
1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
- and your application name. Ex: rails myapp
+ and your application name. Ex: <tt>rails myapp</tt>
2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
4. Follow the guidelines to start developing your application
@@ -36,61 +36,60 @@ link:files/vendor/rails/actionpack/README.html.
== Web Servers
-By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
-with a variety of other web servers.
+By default, Rails will try to use Mongrel if it's installed when started with script/server, otherwise
+Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails with a variety of
+other web servers.
Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
More info at: http://mongrel.rubyforge.org
-Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or
-Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use
-FCGI or proxy to a pack of Mongrels/Thin/Ebb servers.
+Other ruby web servers exist which can run your rails application, however script/server does
+not search for them or start them. These include Thin, Ebb, and Apache with mod_rails.
+
+For production use, often a web/proxy server such as Apache, LiteSpeed, Lighttpd or IIS is
+deployed as the front-end server, with the chosen ruby web server running in the back-end
+and receiving the proxied requests via one of several protocols (HTTP, CGI, FCGI).
+
== Apache .htaccess example for FCGI/CGI
-# General Apache options
-AddHandler fastcgi-script .fcgi
-AddHandler cgi-script .cgi
-Options +FollowSymLinks +ExecCGI
-
-# If you don't want Rails to look in certain directories,
-# use the following rewrite rules so that Apache won't rewrite certain requests
-#
-# Example:
-# RewriteCond %{REQUEST_URI} ^/notrails.*
-# RewriteRule .* - [L]
-
-# Redirect all requests not available on the filesystem to Rails
-# By default the cgi dispatcher is used which is very slow
-#
-# For better performance replace the dispatcher with the fastcgi one
-#
-# Example:
-# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
-RewriteEngine On
-
-# If your Rails application is accessed via an Alias directive,
-# then you MUST also set the RewriteBase in this htaccess file.
-#
-# Example:
-# Alias /myrailsapp /path/to/myrailsapp/public
-# RewriteBase /myrailsapp
-
-RewriteRule ^$ index.html [QSA]
-RewriteRule ^([^.]+)$ $1.html [QSA]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
-
-# In case Rails experiences terminal errors
-# Instead of displaying this message you can supply a file here which will be rendered instead
-#
-# Example:
-# ErrorDocument 500 /500.html
-
-ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
+General Apache options
+
+ AddHandler fastcgi-script .fcgi
+ AddHandler cgi-script .cgi
+ Options +FollowSymLinks +ExecCGI
+
+If you don't want Rails to look in certain directories, use the following
+rewrite rules so that Apache won't rewrite certain requests.
+
+ RewriteCond %{REQUEST_URI} ^/notrails.*
+ RewriteRule .* - [L]
+
+Redirect all requests not available on the filesystem to Rails. By default the
+cgi dispatcher is used which is very slow, for better performance replace the
+dispatcher with the fastcgi one.
+
+ RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+ RewriteEngine On
+
+If your Rails application is accessed via an Alias directive, then you MUST also
+set the RewriteBase in this htaccess file.
+
+ Alias /myrailsapp /path/to/myrailsapp/public
+ RewriteBase /myrailsapp
+
+ RewriteRule ^$ index.html [QSA]
+ RewriteRule ^([^.]+)$ $1.html [QSA]
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
+
+Incase Rails experiences terminal errors instead of displaying those messages you
+can supply a file here which will be rendered instead.
+ ErrorDocument 500 /500.html
+ ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
== Debugging Rails