運行時,我有一個問題PostgreSQL的Rails的問題
$ rake db:create:all
could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/Users/stephanecedroni/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
.....
.....
試圖卸載並重新安裝pg
寶石,但仍然無法工作。
首先試圖跟蹤Ryan貝茨截屏,但有一些問題,然後檢查的Heroku Postgres的建議設置這個路徑:
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
我曾經有過類似的問題。你是如何安裝Postgresql的?你的database.yml是什麼樣的? – jcm
thx爲您的答覆。在Postgres網站上下載。嘗試以下RyanBates截屏..並使用相同的database.yml 發展與自制軟件進行安裝: 適配器:PostgreSQL的 編碼:統一 數據庫:blog_development 池:5 用戶名:博客 密碼: –