我正在开发一个rails 3.2.8项目,我刚刚安装了airbrake gem来跟踪错误,在开发中我做了airbrake安装步骤,然后当我用capistrano进行部署时,我在独角兽中得到了以下错误生产日志:
E, [2012-10-16T03:02:51.588084 #3645] ERROR -- : reaped #<Process::Status: pid 3846 exit 1> worker=3
I, [2012-10-16T03:02:51.588434 #3645] INFO -- : worker=3 spawning...
I, [2012-10-16T03:02:51.708539 #3858] INFO -- : worker=3 spawned pid=3858
I, [2012-10-16T03:02:51.708986 #3858] INFO -- : Refreshing Gem list
E, [2012-10-16T03:02:52.793217 #3849] ERROR -- : uninitialized constant Airbrake (NameError)
/home/ubuntu/apps/nimrod/releases/20121011033552/config/initializers/airbrake.rb:1:in `<top (required)>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:587:in `each'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:587:in `block in <class:Engine>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/ubuntu/apps/nimrod/releases/20121011033552/config/environment.rb:5:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn.rb:44:in `eval'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn.rb:44:in `block in builder'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `call'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `build_app!'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:569:in `init_worker_process'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:589:in `worker_loop'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:498:in `maintain_worker_count'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:272:in `join'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `<top (required)>'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
/home/ubuntu/apps/nimrod/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `<main>'
我注意到 airbrake gem 与所有其他 gem 一起安装在 shared/bundle/ruby/1.9.1/gems 中。
在生产中,我正在运行 Ubuntu 12.04 x64,独角兽与 nginx 和 ruby 1.9.3-p194 一起运行,这个 gem
Using airbrake (3.1.4)
Using capistrano (2.12.0)
Using bundler (1.1.4)
Using rails (3.2.8)
Using unicorn (4.3.1)
并且还试图停止nginx,独角兽然后重新启动它们,但它没有奏效
我希望有人可以帮助我