开发者

Rails Server hangs, Rake db.migrate hangs, appears to be hanging on DB server connection, but I can connect to DB server without a problem

开发者 https://www.devze.com 2023-03-11 15:29 出处:网络
I\'m switching a project from Rails2 to Rails3. I run: rails server The server starts up without errors:

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号