ruby on rails - Repairing Postgresql after upgrading to OSX 10.7 Lion -
i upgraded osx 10.7, @ point rails installation borked when trying connect psql server. when command line using
psql -u postgres
it works totally fine, when try run rails server or console same username , password, error
...activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:950:in `initialize': not connect server: permission denied (pgerror) server running locally , accepting connections on unix domain socket "/var/pgsql_socket/.s.pgsql.5432"?
any ideas might going on super helpful! thanks!
it's path issue. mac osx lion includes postgresql in system now. if which psql
you'll see usr/bin/psql
instead of usr/local/bin/psql
homebrew's correct one. if run brew doctor
should message stating need add usr/local/bin
head of path env variable.
editing .bash_profile or .profile, or whichever shell you're using , adding: export path=/usr/local/bin:$path
as first export path
either quit shell session or source file source ~/.bash_profile
, should ok again.
Comments
Post a Comment