Uday's website
Published on Uday's website (https://uday.net)

Home > How to deploy Ruby app on Heroku

How to deploy Ruby app on Heroku [1]

Submitted by uday [2] on June 17, 2020 - 2:04pm

Documentation [3] is available on Heroku site.

Installation: Brief steps are as follows:

First create a free account with Heroku.

Download and install Heroku CLI [4] (Command Line Interface) on your local machine.

$heroku login

$heroku update

$heroku create [project_name] # When you create an app, a git remote (called heroku) is also created and associated with your local git repository.

Note: If the app already exists on Heroku and you want to link to it from new computer, refer to https://devcenter.heroku.com/articles/git [5]

$git remote -v

$heroku git:remote -a existing_projectname

$git push heroku master # Push local code to Heroku server

$heroku run rake db:migrate

$heroku open # launch the application on heroku server

Debugging

$heroku logs --tail # shows the log real-time tail

$heroku ps # check how many dynos are running, how much free usage quota is remaining

$heroku local web

$heroku local

$heroku addons

$heroku pg

$heroku pg:psql

$heroku keys:add

$git push heroku master

$heroku pg:psql # interact directly with the database if you have Postgres installed locally.

$heroku run rails console # run irb on heroku server

 

Once in a while, when deploying your app to heroku server, you may see a message as follows:

 »   Warning: heroku update available from 7.42.6 to 7.42.13.

Then you need to upgrade heroku-cli using following command.

$heroku update

$heroku --version # to verify the version

 

 

 

 

Rating: 
Tags: 
Ruby [6]

 Valid XHTML 1.0 StrictCreative Commons LicenseVerbatim copying and redistribution of this entire page are permitted provided this notice is preserved. All content on this website including archives (including text, photographs, audio files and any other original work), unless otherwise noted, is licensed under a Creative Commons License or later.


Source URL:https://uday.net/how-to-deploy-ruby-app-on-heroku

Links
[1] https://uday.net/how-to-deploy-ruby-app-on-heroku [2] https://uday.net/user/1 [3] https://devcenter.heroku.com/articles/getting-started-with-ruby [4] https://devcenter.heroku.com/articles/getting-started-with-ruby#set-up [5] https://devcenter.heroku.com/articles/git [6] https://uday.net/taxonomy/term/81