postgres.app instalada pero que psql muestra /usr/bin/psql y no la ruta ingresada en zshrc

Having an issue with postgres.app where its installed, its running, but when I enter which psql I then receive "/usr/bin/psql" and not the correct path that postgres.app expects. When I echo my PATH I get the following:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/username/.rvm/bin:/usr/local/mysql/bin:/Applications/Postgres.app/Contents/MacOS/bin:/Users/username/.rvm/gems/ruby-1.9.3-p0/bin:/Users/username/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/username/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Applications/MAMP/Library/bin/mysql:/Users/username/.rvm/bin

As you can see its in my Path but I have no idea why it wont choose the correct psql. Any assistance would be appreciated.

preguntado el 27 de agosto de 12 a las 06:08

2 Respuestas

If psql es tanto en /usr/bin y /Applications/Postgres.app/Contents/MacOS/bin, el de /usr/bin will be preferred according to your PATH specification. Consider putting the /Applications/... entry before /usr/bin:

/Applications/Postgres.app/Contents/MacOS/bin:/usr/bin:/bin:/usr/sbin:/sbin:...

Respondido 27 ago 12, 09:08

That worked perfectly. Thank you for your help. Don't know why I didn't think of that. - Jaymie Jones

should now be export PATH=/Library/PostgreSQL/9.2/bin:$PATH - Negro

You can also edit /etc/paths and make sure /Applications/Postgres.app/Contents/MacOS/bin is on the top. More info: https://stackoverflow.com/a/6772559/2643002

contestado el 23 de mayo de 17 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.