DEV Community

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

Posted on β€’ Edited on

1

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!!

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay