Help : How to deploy ruby on rails code in production environment?

Please explain how many way we can deploy ruby on rails application in production and what is the best way ?

Easiest way:

  1. Have your code on Github.
  2. Signup for Heroku and create an “app” there.
  3. On the app dashboard, go to “Deploy” and set it to auto deploy your github project.
  4. On the app dashboard, go to “Resources” and add Heroku PostgreSQL and Heroku Redis addons
  5. Go back to “Deploy” and hit the button to deploy the app. Wait until it is done
  6. Go back to “Resources” and add “Web” and “Worker” dynos.
  7. Click “Open app”
  8. Done
2 Likes

Hi, you can also use Dokku or Digital Ocean APPS (new feature in BETA), Hatchbox.io , cloud66 also almost all shared webhostings with plesk control panel supports rails.

Also on youtube you can find many videos how to deploy a ubuntu or ebian server yourself for example suando capsitrano dokker.

Deploy Ruby on Rails To Production in 2019: https://www.youtube.com/watch?v=vzEEfAj45zw

Hope you don’t have a problem with it. Let me know if you need help with something.

2 Likes

I’m a big fan of Hatchbox.io I have written about it here

I use it in a bunch of production servers. It has been great.

The choice of the Ruby on Rails application deployment method can be divided into two categories - your own server managed by you (e.g. hosted on Digital Ocean or AWS EC2) and code upload tool (e.g. Capistrano or similar) or a more automated cloud solution, like Heroku or AWS Elastic Beanstalk. I highly recommend the latter 2, because it saves an incredible amount of time, and they are not expensive at the beginning. Both Heroku and Elastic Beanstalk (EB) are based on Git. Deployment is as simple as git push [heroku] [master] or eb deploy. EB will use the git archive method and upload the archive to the servers instead of the push command while Heroku relies on your project’s repository clone.

PS. hatchbox, cloud66, dokku and digitalocean apps (nanobox) look like good alternatives to the solutions described above, but I haven’t tested them yet. They fall into category of fully automated solutions similar to AWS EB and Heroku.

2 Likes