1

I would like to know is their a way to look into our data entries which is made to the postgresql database present in Heroku. I am using Rails 4 and I have tried heroku run rails console it works fine, but everything is all messed up.

And while using heroku pg:psql as it was suggested to me as an answer below

psql is not recognised as an internal or external command, operable file or batch file

What is wrong with it?. thank you for helping.

chaitanya90
  • 677
  • 1
  • 8
  • 20

3 Answers3

2

You must (according to heroku documentation) have PostgreSQL installed on your system to use

heroku pg:psql

The docs has links to installers for common platforms.

I am using Windows and this fixed the problem for me once I permanently added the location of psql.exe to my system path :

setx path "%path%;C:\Program Files (x86)\PostgreSQL\9.4\bin"

Community
  • 1
  • 1
Johno Scott
  • 1,690
  • 17
  • 13
0

Do you want to open the Postgre terminal? If so, just type:

Heroku pg:psql

In your terminal to enter your database. Docs here.

Alex
  • 7,405
  • 1
  • 30
  • 27
  • i got an error saying "psql is not recognised as an internal or external command, operable file or batch file". – chaitanya90 Apr 26 '14 at 14:05
0

Well the solution to this problem is to move to that specific path where the psql.exe is present. For example, C:\Program Files\PosrtgreSQL\9.3\bin and then it can be executed by the following:

heroku pg:psql --app app_name 

this will get this working.

chaitanya90
  • 677
  • 1
  • 8
  • 20