Welcome Guest | Login

Example Rake File for Deploying to HostingRails DB

From the installation using FastCGI instructions:
Via Rake?  Setup your rake file and simply do a rake_migrate

Do you have an example or more detailed instructions on how to setup this step?  I use rake for all of my database migrations but I'm not clear on how to make it connect to the remote MySQL DB located on the HostingRails.com server?  

I've setup my DB and created a user within it.

2007-07-19 09:28 AM

First, ensure that you have set up the production db settings in 'config/database.yml'.  It should have the username/password/db you set up in CPanel.

Then, while you are SSHed into your account, go to your rails application directory and run:
'rake db:migrate RAILS_ENV=production'

This will run your migrations on the production database instead of the development database.

2007-07-19 02:39 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.