heroku pg:psql --app my-app fails with command not found

heroku, postgresql, ruby-on-rails-3

Solution

This means that you don't have the `psql` command in your system. Try `which psql` to confirm. If you have installed postgres, then it means that its `bin` directory is not in your $PATH. If you haven't installed postgres yet, then install postgres and try again.

Problem

Environment - Mac OSX Maverick - Rails 3.2.11 - Ruby 1.9.2p290 - Heroku toolbelt From my terminal: ``` $ heroku pg:psql --app my-app ---> Connecting to HEROKU_POSTGRESQL_CYAN_URL (DATABASE_URL) sh: psql: command not found ```

Original source