Search For Answers
Rails Quickstart Guide
Last updated: March 28, 2011
Creating the symbolic link
You will first need to direct the apache(httpd) webserver to your rails applications public directory. This applies to the domain at the root level or a sub-domain and is done from the command line by creating a symlink as follows:
rails railsapp
mv public_html public_html.bkp
ln -s ~/railsapp/public ~/public_html
Notes
If your application is already designed, you may simply upload it using an FTP client or from the command line if preferred. Try not overwriting anything in the railsapp/script directory, and retain the .htaccess / dispatch files in the public directory. If these are overwritten, simply change to the railsapp directory and type "rails ." then yes to the files you would like to overwrite.
Permissions
Your railsaap/public directory will need to be set to 755 and nothing higher, including anything inside of it. FastCGI may also complicate things and isn't recommended until your application is production ready.
Trailing Slash Error
Your browser sent a request that this server could not understand.
Client sent malformed Host header
This means your .htaccess isnât interpreting the missing slash properly and can be fixed by adding the following to 'yourapp/public/.htaccess' below RewriteEngine On:
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} ^.*[^\/]$
RewriteRule ^(.*)$ $1/ [N]
Default indexing to work within public
RewriteRule ^(.*)$ $1/index.html [N]