You can run heroku run rails c --app <appname>
. I will also add, if you want to view your database, you can make use of PG Commander https://eggerapps.at/pgcommander/ which actually automatically parses all the credentials out for you.
If you want to do this, run heroku config --app <appname>
and then copy the DATABASE_URL
. After you've done this, create a new favourite in your PG Commander and you'll see that it has already automatically filled in all the credentials based on what was in your clipboard.