It seems like I have it set up, I have my database.yml using postgres, and I can connect the database with pgadmin III, but when I tried using the psql command to test what version, it says that is is not recognized? Any idea what I should be doing?
I'm using windows and using command prompt with Ruby on Rails. Using PostgreSQL 9.2 installed with the EnterpriseDB one-click installer.
On Windows, the default data folder is C:\Program Files\PostgreSQL\x.x\data.
The quick way to verify the installation is through the psql program. First, click the psql application to launch it. The psql command-line program will display. Second, enter all the necessary information such as the server, database, port, username, and password.
Assuming you installed PostgreSQL on Windows with the PostgreSQL "One-click" installer packaged by EnterpriseDB, psql
is not added to the PATH
automatically. That's partly because adding it to the path could otherwise cause confusion when people have multiple versions of PostgreSQL installed.
You need to specify the full explicit path to psql
, eg:
"%PROGRAMFILES%\Postgresql\9.2\bin\psql.exe"
or add psql
to the user PATH
environment variable, see eg this guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With