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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -