Building the first Rails app is usually easy, deploying it
I am not sure about A2 setup, most of the shared hosting services
offering cheap accounts with support for Rails use Apache + FastCGI.
This means that Apache administers your Rails app starting it when a
request is received, letting it live for a while and then sutting it
down if no more requests reach Apache for a while (persistent process
What does Apache + FastCGI expect from your app? A public
directory, including a .htaccess that routes the “dinamic” part of the
app (not the JS and imgaes usually) to dispatach.fcgi. This scripts is
responsible of handling the dinamic stuff in your app, initializing
Rails and feeding it with the request info, waiting for a response and
passing it back to Apache.
If you have a app at your top domain just replace the public_html
(as it is usually named) with a symbolic link to your app public
folder. Be sure to check:
- The path to Ruby interpreter at the top of the script to match
the actual path of the server
- That .htaccess is setup to use the fcgi handler and not the cgi
handler (too slow)
- That you force the production mode in the Rails configuration
About the other apps living in subdomains, I am not sure if they
will be resolved if you create symbolics links in the app/public
folder to their public folder… Give it a try.
I would recommend not to use Capistrano for the first time, until
you finally defined the layout of your setup. Then start working with
Capistrano to automate the deployment process. Capistranos has to be
added to your app, and configured. It relies eavily in SSH and SVN and
in shared hostings it could be a little more difficult to setup.
On Feb 26, 5:35 pm, Matt M. [email protected]