Rails developer often meet difficulties to deploy their apps. Additional setting base and server limitation make some developer decide using VPS or Dedicated server. Heroku platform exist to solve this problem. Minimum development environment already to used for your apps.
Heroku Platform help Rails developer to launch application without doubt about server setting. Free account permit us creating 5 apps. For Verified account you can create 100 apps.
Here we go to deploy our rails apps :
- Install heroku on your computer. For Ubuntu user you can use this command
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku
- Adding Heroku key with command
- Make sure you have commit most update script app. It preventing headache when got different output in online version and local. Use git command to push your script
git push heroku master
- If your rails apps don’t have any default routes, error page will be shown. So, you don’t have to be panic. Change your root routes in routes.rb file
- If your gemfile editing still produce error. Try to delete Gemfile.lock and then run command
- If error still shown, google it errors message. Try to explore any option.
Note : Heroku using PostgreSQL. So, every database adapter need to switch to PostgreSQL. Be careful with your SQL command and ORM. Sometime changing database could make some feature not working.
Here is my simple production apps. http://camelDev.heroku.com. Really really simple, isn’t it? It’s remind me “Simplicity is the power” words.