To begin, after I saw the zip file uploaded to the client's app I performed the following commands
[~]# unzip railsapp.zip
[~]# cd railsapp
[~/railsapp]# cd config
[~/railsapp/config]# vi database.yml
I made sure the database.yml file consisted only of the following: production:
adapter: mysql
database: username_db
username: username_dbuser
password: thepassword
Then in the environment.rb file I made sure this line was uncommented ENV['RAILS_ENV'] ||= 'production'
Then jumping over to the routes.rb I set:map.connect '', :controller => "the_default_controller"
At this point the config folder was set. I then jumped into their cPanel and created the mySQL database 'db', created the user and password, then assigned the user to the database (this last step is important!)Double checking that ~/railsapp/db/schema.sql was there I ran a quick:
[~/railsapp]# rake db:migrate RAILS_ENV='production'
which seemed to work nicely. Moving on to the public folder I made sure the Shebang line of dispatch.rb and dispatch.fcgi files were set to #!/usr/local/bin/ruby - then I ran a quick
[~/railsapp/public]# chmod 755 disp*
which set the right permissions for the dispatchers. Then I renamed the index.html file to index.html.backup
[~/railsapp/public]# mv index.html index.html.backup
and made sure the AddHandler for fastcgi was commented out of the ~/railsapp/public/.htaccess#AddHandler fastcgi-script .fcgi
...which is needed because we're running mod_fcgid on the clients server which is already 'Handled' in the httpd.conf file. And so the last step is just to make the symlink in root for public_html
[~]# mv public_html public_html_backup
[~]# ln -s ~/railsapp/public ~/public_html
Then browsing to the client's url showed the app fire up correctly on FastCGI Cheers,
~William