Assume that your project directory is
~/my_project. Using MySQL And manage you code with git. You want to deploying it to heroku and keeping working locally with MySQL. This is my solution:
Download and install heroku toolbelt.
After installed, you should got
heroku command in CLI now.
cd to your project directory:
Set up heroku app
Login to heroku with email and password:
You might be asked to generate SSH publich key at first time login
Create and rename an heroku app
Heroku provide 3 ways to use asset pipeline. I currently use "compiling assets locally". It's simple but less automatically.
Make sure your had set production environmnet correctly in local. Or you may encounter problems on running
rake … RAILS_ENV=production.
To keep local working with MySQL. I opened a branch for heroku depolyment called
Now run bundle install
Last, deploy to heroku
If you are pushing local
masterbranch to heroku than you should use
git push heroku master
I like to keep heroku-related modifications to
heroku branch. So merge frequently: