DEV Community

n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on • Updated on

Heroku CLI for Rails

Sometimes, you have to fix at the Heroku CLI for like this situation.

Alt Text

(I met this after I had added devise gem)

πŸ‘ First of all

1. login to heroku CLI

$ heroku login
heroku: Press any key to open up the browser to login or q to exit:

Opening browser to https://cli-auth.heroku.com/auth/cli/browser/xxxx
Logging in... done
Logged in as xxxxx@xxx.xxx

2. list apps

Make sure which app you want to manipulate.

$ heroku apps
=== xxxxxxxxx Apps
aaaaa
bbbbb
ccccc

πŸ› Debuging

$ heroku logs -a [app_name]
$ heroku logs --tail -a [app_name]

$ heroku run rails c

πŸ‘ db:migrate

$ heroku run rake db:version -a [app_name]
$ heroku run rake db:version -a eventer-prototype

Top comments (2)

Collapse
 
mikerogers0 profile image
Mike Rogers ✈️ • Edited

My current most common command is:

heroku run rails c

Just to quickly lookup something about an object :D

Collapse
 
n350071 profile image
n350071πŸ‡―πŸ‡΅

Great πŸ‘It's so helpful!
Thank you!!