'rails server' starts thin twice, shuts both down. Cucumber still works

╄→гoц情女王★ 提交于 2019-12-13 03:44:53

问题


My rails application fails to start up in development mode. It appears to work in both production and test mode. Here is what I get when I run 'rails server':

Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:51960, CTRL+C to stop
Booting Thin
Rails 3.2.11 application starting in development on http://0.0.0.0:3000
Call with -d to detach
Ctrl-C to shutdown server
Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting

One clue I've found is that thin seems to start before every call to rails. For example, here is what happens when I call rails console:

Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:52262, CTRL+C to stop
Loading development environment (Rails 3.2.11)

This error has shown up on two different computers. The first (macbook) I simply cloned the github repository into a new folder and started it up from there, fixing things (how? Not sure). The second computer (iMac) did not respond to this.

I'm using ruby 1.9.3, rails 3.2, and thin 1.5.1.

More mysteriously, removing thin from my gemfile does nothing to fix the error. Rails still uses thin to start. I cannot find a direct reference to thin in the rest of my project.

Please excuse my relative ignorance of the internals of both rails and web servers. Any ideas on what might be causing this?

PS I am aware of this SO question and the solution there did not work for me.


回答1:


I found out why. I was running the gem 'fake_braintree' in both development and test. It is meant to be run only in test. When it is run, it starts up a thin server which conflicts with the thin server I am wanting to run.



来源:https://stackoverflow.com/questions/15733117/rails-server-starts-thin-twice-shuts-both-down-cucumber-still-works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!