Note that there are some explanatory texts on larger screens.

plurals
  1. POPostgreSQL & Lion - Paths
    primarykey
    data
    text
    <p>Trying to get postgres to work with Lion. When I run rake:db create I get:</p> <pre><code>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"? </code></pre> <p>There are a lot of SO topics on the same issue but none of solutions have worked for me. Here is what I have tried:</p> <ul> <li>Uninstalled &amp; reinstalled the pg gem</li> <li>Installed postgres.app (when I am connected to the local server, pg is still not working)</li> <li>Updated paths file so that usr/local/bin is above usr/bin</li> <li>Changed permissions on var/pgsql_socket to read/write for everyone</li> </ul> <p>What might be a hint is that when I run which psql the result is usr/bin/psql - I believe it is meant to be usr/local/bin/psql, but after editing my paths file directly, I'm not sure why it hasn't changed. Homebrew is also working completely fine for me (no paths issue there). </p> <p>Any ideas?</p> <p>EDIT - What's in my database.yml:</p> <pre><code>development: adapter: postgresql encoding: unicode database: hubbed_development pool: 5 username: hubbed password: host: localhost test: adapter: postgresql encoding: unicode database: hubbed_test pool: 5 username: hubbed password: production: adapter: postgresql encoding: unicode database: hubbed_production pool: 5 username: hubbed password: </code></pre> <p>EDIT - After running ps aux | grep postgres:</p> <pre><code> 666 0.0 0.0 2445588 540 ?? Ss 9:42am 0:00.00 postgres: checkpointer process 664 0.0 0.1 2445588 3604 ?? S 9:42am 0:00.02 /Applications/Postgres.app/Contents/MacOS/bin/postgres -D /Users/angsmith/Library/Application Support/Postgres/var -p5432 681 0.0 0.0 2434892 540 s000 S+ 9:43am 0:00.00 grep postgres 670 0.0 0.0 2441868 396 ?? Ss 9:42am 0:00.00 postgres: stats collector process 669 0.0 0.0 2445720 1524 ?? Ss 9:42am 0:00.00 postgres: autovacuum launcher process 668 0.0 0.0 2445588 488 ?? Ss 9:42am 0:00.00 postgres: wal writer process 667 0.0 0.0 2445588 524 ?? Ss 9:42am 0:00.01 postgres: writer process </code></pre> <p>EDIT - saw that in postgress.app my username was 'postgres'. After updating my database.yml username to postgres and running bundle exec rake db:create:all, I am now getting the following error (different to before):</p> <pre><code> rake aborted! dlopen(/Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/pg-0.14.1/lib/pg_ext.bundle, 9): Library not loaded: /usr/local/lib/libpq.5.5.dylib Referenced from: /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/pg-0.14.1/lib/pg_ext.bundle Reason: image not found - /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/pg-0.14.1/lib/pg_ext.bundle /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/pg-0.14.1/lib/pg.rb:4:in `require' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/pg-0.14.1/lib/pg.rb:4:in `&lt;top (required)&gt;' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/gems/bundler-1.2.3/lib/bundler.rb:128:in `require' /Users/angsmith/hubbedspree/config/application.rb:7:in `&lt;top (required)&gt;' /Users/angsmith/hubbedspree/Rakefile:5:in `require' /Users/angsmith/hubbedspree/Rakefile:5:in `&lt;top (required)&gt;' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval' /Users/angsmith/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;' (See full trace by running task with --trace) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload