我的任务是在前一天升级机器上的ruby安装。我从源代码安装(通常是./configure,make,make install)并更新了所有宝石。目前,该网站不会加载Ruby Rack错误,我不知道如何解决:
[ pid=21855 thr=104368260 file=utils.rb:176 time=2013-02-19 11:33:32.952 ]: *** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (undefined method `<<' for nil:NilClass (NoMethodError)) (process 21855, thread #<Thread:0x0000000c711108>):
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-flash-0.1.2/lib/rack/flash.rb:20:in `run'
from config.ru:7:in `block in <main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:225:in `eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:225:in `load_rack_app'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:157:in `block in initialize_server'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb:563:in `report_app_init_status'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:154:in `initialize_server'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:180:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
from <internal:prelude>:10:in `synchronize'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server:99:in `<main>'
你们之前有没有见过这种类型的错误?有关如何解决它的任何想法?
答案 0 :(得分:0)
我发现了我的问题。查看错误时,我注意到跟踪中的第一个模块是rack-flash
。事实证明它的新版本与此应用程序也在使用的sinatra
不兼容。我注释掉了闪存相关的代码并运行了应用程序。
现在我只需要找出将闪存相关代码移植到sinatra-flash
的正确方法,我想我很高兴。