Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open psql on Mavericks #137

Closed
mcmillion opened this issue Oct 6, 2013 · 24 comments

Comments

Projects
None yet
@mcmillion
Copy link

commented Oct 6, 2013

When running version 9.3.0.0 on Mavericks GM, trying to open psql from the menu option gives the following error:

“psql” can’t be opened because Postgres is not allowed to open documents in Terminal.

Manually running psql from inside the app container does work.

@phnah

This comment has been minimized.

Copy link

commented Oct 23, 2013

I suffered the same problem since he Marvericks was already out this morning.

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 23, 2013

This is probably related to sandboxing.

This issue (and a few others) will mean that we will need to disable app sadboxing again for Postgresapp in a future release. This is very unfortunate, because it means that we wont be able to put it in the Mac App Store :(

@ciddennis

This comment has been minimized.

Copy link

commented Oct 23, 2013

For now add /Applications/Postgres.app/Contents/MacOS/bin to your PATH in .profile. That will give you access from the terminal at least.

@danielnitsche

This comment has been minimized.

Copy link

commented Oct 27, 2013

Thanks @ciddennis that worked after a terminal restart (and I used .bash_profile instead).

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 28, 2013

Could someone try if it works in the latest pre-release: https://github.com/PostgresApp/PostgresApp/releases/tag/9.3.1.0-alpha1

@ciddennis

This comment has been minimized.

Copy link

commented Oct 28, 2013

Looks like it works for me.
Thanks

@kulbida

This comment has been minimized.

Copy link

commented Oct 28, 2013

works for me too, thanks.

@NickWoodhams

This comment has been minimized.

Copy link

commented Oct 28, 2013

When I modify and reload my path, then run psql -h localhost

Keep getting the error
psql: could not translate host name "localhost" to address: nodename nor servname provided, or not known

Localhost works in the browser

Tried with 9.3.0.0 and the alpha version above. Any thoughts?

UPDATE
Actually it was my hosts file. Has anyone else noticed that the hosts file on Mavericks is really stubborn? Commenting with the pound sign seems to break it.

@ndemoreau

This comment has been minimized.

Copy link

commented Oct 29, 2013

I'm having this issue despite having edited my .bash_profile.

This is how it looks like:

export APP_NAME=masterproj
export LC_ALL="en_US.UTF-8"
export PGHOST=localhost
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
PATH="/usr/local/heroku/bin:$PATH"
PATH=“/Applications/Postgres.app/Contents/MacOS/bin”

Any clue?

@phnah

This comment has been minimized.

Copy link

commented Oct 29, 2013

@ndemoreau You should change to "/Applications/Postgres93.app/Contents/MacOS/bin", since the app name is change in this alpha version

You can read it here :
https://github.com/PostgresApp/PostgresApp/releases/tag/9.3.1.0-alpha1

@NickWoodhams

This comment has been minimized.

Copy link

commented Oct 29, 2013

What happens when you run /Applications/Postgres93.app/Contents/MacOS/bin/psql and /Applications/Postgres.app/Contents/MacOS/bin directly in your terminal?

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 29, 2013

@ndemoreau the last line of your .bash_profile is missing :$PATH, which will probably break all kinds of things

@ndemoreau

This comment has been minimized.

Copy link

commented Oct 29, 2013

@jakob: I've removed the last line but still have the same issue. @guhelouis: I'm not using the alpha, I'm using the 9.3.0.0 version.
@NickWoodhams:
This seems to be working in terminal:

/Applications/Postgres.app/Contents/MacOS/bin/psql
psql (9.3.0)
Type "help" for help.

nicolas=#

When I try from the postgress.app menu, I still get the same warning though.
My path doesn't seem to work either.
Strange...

@ndemoreau

This comment has been minimized.

Copy link

commented Oct 29, 2013

FYI: I installed the new alpha and now I can launch psql from the olifant menu.
But the path still doesn't work. In terminal, I need to type the full path to start psql

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 29, 2013

Let me try to summarize the different issues in this thread:

  • Opening psql from the menu doesn't work on Mavericks. 9.3.1.0-alpha should fix that.
  • @NickWoodhams had a broken /etc/hosts file
  • @ndemoreau has a misconfigured $PATH

To troubleshoot a misconfigured PATH variable, the following commands may help:
which psql
echo $PATH

Variables can be configured in a number of files like .bash_profile, .profile, .bashrc etc. Note that you always need to close & reopen the Terminal window after changing any of those files.

@ndemoreau

This comment has been minimized.

Copy link

commented Oct 29, 2013

Hello, I can't solve this path issue. I searched in all the files you mentioned but couldn't find anything abnormal. When I do a echo $PATH, the path I entered in .bash_profile is not written.

I understand this issue is not related to postgresapp. The new alpha works like a charm.

So thank you very much.

I'll try to understand these PATH issues when I find the time...

@ssbarnea

This comment has been minimized.

Copy link

commented Oct 29, 2013

I am looking forward to see this as released. BTW, because I do have postgresql client installed using brew, it seems that running psql from the command line works (obviously doesn't from the elephant menu on current release).

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 29, 2013

@ndemoreau My knowledge of bash is pretty limited myself, but shouldn't it say export PATH=/Applications/Postgres93.app/Contents/MacOS/bin:$PATH in .bash_profile? (Note the export at the beginning of the line)

@elikem

This comment has been minimized.

Copy link

commented Oct 30, 2013

@hanhpho thanks.
The alpha version works perfectly.

@sambecker

This comment has been minimized.

Copy link

commented Oct 31, 2013

I'm on Mavericks as well and haven't been able to use the Postgres App with a Rails installation

@jakob

This comment has been minimized.

Copy link
Member

commented Oct 31, 2013

@sambecker

This comment has been minimized.

Copy link

commented Nov 4, 2013

@jakob the pre-release worked! I've been having some trouble getting Mavericks to remember the Postgress App PATH in the terminal, which I constantly export, but it does seem to be working better all around.

@notnil

This comment has been minimized.

Copy link

commented Dec 20, 2013

I had this problem because the documentation from http://postgresapp.com/documentation instructions say to use:

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"

instead of

PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"
@jakob

This comment has been minimized.

Copy link
Member

commented Dec 21, 2013

Yes, the outdated docs are a problem. I'll work on them after the holidays.

In the mean time, the latest version has a fix for this, it scans your profile files and offers to update outdated paths.

Am 20.12.2013 um 22:32 schrieb Logan Spears notifications@github.com:

I had this problem because the documentation from http://postgresapp.com/documentation instructions say to use:

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
instead of

PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.