我无法再启动我的 Ruby on Rails 应用程序了。没有明显的原因,任何命令,如“rails s”、“rake db:migrate”、“thin start”等现在都会触发以下异常:
Connection refused - connect(2) (Errno::ECONNREFUSED) (Excon::Errors::SocketError)
经过一番阅读,这似乎表明某处某处没有监听某些端口(!)但不幸的是,这是一个我真的不了解和不熟悉的领域。
在试图找出可能导致这种情况的原因时,我能想到的唯一最近的变化是在运行 Mavericks 的 Macbook pro 上安装和使用 Jmeter 和 Homebrew。
任何可以指出我最终解决这个问题的正确方向的想法都将受到高度赞赏。
作为记录,以下是说明问题所在的行:
编辑:这是完整的跟踪:
/Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:218:in `connect_nonblock': Connection refused - connect(2) (Errno::ECONNREFUSED) (Excon::Errors::SocketError)
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:218:in `rescue in block in connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:187:in `block in connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:183:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:183:in `connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:28:in `initialize'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:418:in `new'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:418:in `socket'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:126:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/newrelic_rpm-3.8.0.218/lib/new_relic/agent/instrumentation/excon/middleware.rb:28:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/mock.rb:42:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:269:in `request'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:70:in `block (3 levels) in <class:Connection>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:84:in `log'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:62:in `block (2 levels) in <class:Connection>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/rest/node_auto_indexes.rb:38:in `set_node_auto_index_status'
from /Users/pierre/argomento/config/initializers/01_neo4j.rb:20:in `<top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:592:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `run'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/application.rb:136:in `initialize!'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/pierre/argomento/config/environment.rb:5:in `<top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
from /Users/pierre/argomento/config.ru:3:in `block in <main>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/pierre/argomento/config.ru:in `new'
from /Users/pierre/argomento/config.ru:in `<main>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands/server.rb:46:in `app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands/server.rb:70:in `start'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:50:in `tap'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'