I\'m having trouble when working with multiple Heroku accounts on my computer.
The thing is that it\'s worked great before by switching accounts with the heroku gem.
The Heroku plugin https://github.com/ddollar/heroku-accounts has been deprecated. Heroku now maintains its own at https://github.com/heroku/heroku-accounts. Unfortunately it doesn't seem to store project-by-project which account it should be using so you need to run
$ heroku accounts:set account_name
each time you want to use the Heroku command-line tool.
Quick solution for people with access to the bash shell: make a local bin directory (it's already there in Rails applications) and create bin/heroku there. Contents:
#!/bin/bash
/usr/bin/heroku accounts:set account_name
/usr/bin/heroku $*
(replace "project_name" as appropriate) Then run
$ chmod +x bin/heroku
You can then run
$ bin/heroku run console
and it will automatically use the right Heroku account for you. Better still is to add ./bin to your path so you're back to just running:
$ heroku run console