I'm switching a project from Rails2 to Rails3. I run:
rails server
The server starts up without errors:
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
loaded openid
When I connect to localhost:3000, the server registers a \GET request in the log, but never responds. The HTTP just hangs open. Inspecting the process shows that it is connecti开发者_Go百科ng to the localhost DB switching ports every 2 seconds.
Development.log shows "Started GET "/" for 127.0.0.1 at Mon Jun 06 12:44:08 -0400 2011" but nothing else.
Same issue occurs if I attempt to run any rake task.
Other people in my office are running the same code in rails3 without problems (I tried it with a fresh git clone).
I can connect to the localhost DB without any problems.
Problem did not occur when running rails2.
Any ideas about where my problem is? How I can debug (secret log files, places to sneak in a debugger to see what is going on, etc..)?
EDIT: Problem magically went away, how odd.
You say the app hangs. When you kill it, it should show a backtrace of where it was just before. This should give you a clue where to look for the problem.
A further investigation of this issue determined that the database.yml was incorrectly configured (the wrong ip address was being specified for local host).
精彩评论