2
votes

I've used this site a bunch over the past three years or so...this is my first post :D

But enough of the useless banter and on to the business at hand.


I will start with the approach/problem, the error, and then a trace/log of the error.

Then I will go over what I've done so far to best this problem, some odd things I've noticed, and what I think might be causing it.


APPROACH/PROBLEM:

I was recently added to the back-end development team for a mobile app, and before I implement any new features I have to get the product up and running on my local machine...

(in app directory) rails s

=> Booting WEBrick

=> Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000

=> Call with -d to detach => Ctrl-C to shutdown server

[2011-09-14 19:11:59] INFO WEBrick 1.3.1

[2011-09-14 19:11:59] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0]

[2011-09-14 19:11:59] INFO WEBrick::HTTPServer#start: pid=35031 port=3000

So all of this looks fine for now, but when I attempt to access the page on a browser...


ERROR:

(browser page title): Action Controller:Exception caught

PGError

fe_sendauth: no password supplied


TRACE/LOG

(continued from last line on terminal in the first section)

cache error: No server available

/Library/Ruby/Gems/1.8/gems/dalli-1.0.5/lib/dalli/ring.rb:45:in `server_for_key'

/Library/Ruby/Gems/1.8/gems/dalli-1.0.5/lib/dalli/client.rb:239:in `perform'

/Library/Ruby/Gems/1.8/gems/dalli-1.0.5/lib/dalli/client.rb:60:in `get'

/Library/Ruby/Gems/1.8/gems/rack-cache-1.0.3/lib/rack/cache/metastore.rb:320:in `read'

/Library/Ruby/Gems/1.8/gems/rack-cache-1.0.3/lib/rack/cache/metastore.rb:30:in `lookup'

/Library/Ruby/Gems/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:165:in `lookup'

/Library/Ruby/Gems/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:65:in `call!'

/Library/Ruby/Gems/1.8/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:50:in `call'

/Library/Ruby/Gems/1.8/gems/rack-1.3.2/lib/rack/deflater.rb:13:in `call'

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/rack/content_length.rb:16:in `call'

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/rack/log_tailer.rb:14:in `call'

/Library/Ruby/Gems/1.8/gems/rack-1.3.2/lib/rack/handler/webrick.rb:59:in `service'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

/Library/Ruby/Gems/1.8/gems/rack-1.3.2/lib/rack/handler/webrick.rb:13:in `run'

/Library/Ruby/Gems/1.8/gems/rack-1.3.2/lib/rack/server.rb:265:in `start'

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/commands/server.rb:70:in `start'

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/commands.rb:54

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/commands.rb:49:in `tap'

/Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc4/lib/rails/commands.rb:49

script/rails:6:in `require'

script/rails:6

cache: [GET /] pass

Dalli::Server#connect localhost:11211

localhost:11211 failed (count: 0)

I can give out the full trace from the browser as well, but I don't want this post to get TOO wordy.

So this is the dilemma!


What I've Done:

The simple solutions(listed below) haven't made any difference.

The pg gem installed correctly(after including the path manually)

I fixed the pg_hba.conf file to allow trust(ed) connections.

I can connect to a postgres db through the pgadmin3 tool and through the terminal.


Huh?:

Running the server on a different port doesn't make any difference, although if I try to connect to one of the ports reserved for my postgresql db, the connection is busy(I can post that error log as well, if needed).

If I try to access a non-existent page from the app...like users/explode or signin/signout, the error is the same. The terminal log does show the " [GET /'var'] pass " each time, though.


Thoughts:

My best guess is that the problem is from the connection still expecting a password, since there is a pass - word at the end of " [GET /'var'] pass "

OR

That the pg db is being run on a different server and the app doesn't like me trying to run it on my local machine.

I'm hoping your guess is better than mine.


If you managed to make it though this post, kudos. It's greatly appreciated. If you manage to come up with a solution, somehow, I will be eternally gracious.

Regards,

~Ryan Johnson(RyeGuyHead)

1

1 Answers

4
votes

Either change your pg_hba.conf to

local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust

Or replace trust to md5 and specify the password in database.yml