我刚刚在我的 Rails 应用程序上安装了一个新的 gem。在开发机器上一切正常。
一旦我将应用程序部署到我的生产服务器,我就会得到一个Uninitialized constant
并且unicorn.log
应用程序将无法运行。
我可以在rails s
服务器上运行应用程序,所以文件 100% 在那里。我假设这是一个独角兽问题。
关于如何调试的任何想法?
编辑:添加堆栈跟踪
E, [2013-05-19T09:11:56.596020 #14042] ERROR -- : uninitialized constant Rabl (NameError)
/home/deployer/apps/papaya/releases/20130519131101/config/initializers/rabl_init.rb:1:in `<top (required)>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:587:in `each'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:587:in `block in <class:Engine>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/deployer/apps/papaya/releases/20130519131101/config/environment.rb:5:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/rack-1.4.4/lib/rack/builder.rb:51:in `instance_eval'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/rack-1.4.4/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn.rb:44:in `eval'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn.rb:44:in `block in builder'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:718:in `call'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:718:in `build_app!'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:591:in `init_worker_process'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:611:in `worker_loop'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:511:in `maintain_worker_count'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/lib/unicorn/http_server.rb:277:in `join'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/gems/unicorn-4.5.0/bin/unicorn:121:in `<top (required)>'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
/home/deployer/apps/papaya/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'