Deploying an existing Rails application to ASO Notes.
These notes are for a Rails application that used mysql, and was developed on a windows machine. I followed the directions in
Deploying an Existing Application with the following modifications.
Make sure to develop on the same version of Rails as is running on ASO, or at least qualify the app on the same version. I had developed on Rails 1.2.3 and had to go back and qualify / modify it for 2.0.2.
The cPanel Rails applet does not work and does not do the right thing - it creates the whole application in the public_html folder - do not use it.
I did not use db migrations, instead, I setup the mysql database first through the cPanel applet / phpAdmin and imported my schema. I had to comment out of the schema 'create database' and 'use database' commands as they are not available in the shared environment on ASO, in order to run the import script successfully.
Also I noted that the schema and the user name created on ASO was automatically prepended with my ASO username, and I needed to take this into account when I edited the database.yml.
Created a rails skeleton on ASO, using
Without -d mysql it creates a database.yml for sqllite, so this saves a little editing.
Also I found I could change the permissions to 600 on database.yml.
Then I installed plugins I needed. This example shows the install for the will_paginate plugin, which is pretty much required since they took the paginator out of Rails 2.0. It may be possible to copy plugins from your deployment sources, however, I wanted to minimize any possible problems deploying my application, so I did as much as possible in the native environment on ASO.
cd ~/myapp
script/plugin source svn://errtheblog.com/svn/plugins
script/plugin install will_paginate
Edited the environment.rb to comment out the line setting the RAILS_ENV to production since I was not running the script described in
Deploying an Existing Application .
Then I deployed my app :
- copy everything in app
- copy files I created or modified in public.
- copy files I created or modified in config/initializers.
- merged changes in config/routes.rb
Keeping to this list kept the cross platform issues to nil for me.
Otherwise I found the instructions in
Deploying an Existing Application very helpful. Also I found some good stuff at
Overview of Common Ruby on Rails deployment mistakes∞
There are no comments on this page. [Add comment]