Rails 2 应用程序RubyGems 1.8.7 失败

发布于 2024-11-27 21:44:38 字数 5221 浏览 0 评论 0原文

将 RubyGems 从更旧的版本升级到 1.8.7 后,我们的 Rails 2 应用程序将不再启动。将引发 NoMethodError,并显示消息 undefined method 'name' for "POpen4":String。完整的堆栈跟踪如下:

[ pid=5996 thr=71772310 file=utils.rb:176 time=2011-08-05 16:14:59.635 ]: *** Exception NoMethodError in PhusionPassenger::ClassicRails::ApplicationSpawner (undefined method `name' for "POpen4":String) (process 5996, thread #<Thread:0x88e512c>):
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb:239:in `=='
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `==='
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `matching_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410:in `each'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/specification.rb:409:in `each'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `find_all'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `matching_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:238:in `to_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems.rb:1200:in `gem'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb:57:in `add_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `add_gem_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `each'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `add_gem_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:132:in `process'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
    from /theapplicationdir/config/environment.rb:5
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:222:in `preload_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:181:in `initialize_server'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/utils.rb:572:in `report_app_init_status'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:174:in `initialize_server'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:180:in `start'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/helper-scripts/passenger-spawn-server:99

Rails 3 应用程序启动并运行良好。有人对错误是什么以及我们如何修复它有任何想法吗?

对于一些环境信息 - 我们使用 Phusion Passenger 3.0.8、Nginx 和 REE 1.8.7。

After upgrading RubyGems to 1.8.7 from a much older version our Rails 2 apps will no longer boot. A NoMethodError is raised with the message undefined method 'name' for "POpen4":String. The full stack trace follows:

[ pid=5996 thr=71772310 file=utils.rb:176 time=2011-08-05 16:14:59.635 ]: *** Exception NoMethodError in PhusionPassenger::ClassicRails::ApplicationSpawner (undefined method `name' for "POpen4":String) (process 5996, thread #<Thread:0x88e512c>):
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb:239:in `=='
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `==='
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `matching_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410:in `each'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/specification.rb:409:in `each'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `find_all'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:216:in `matching_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:238:in `to_specs'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems.rb:1200:in `gem'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb:57:in `add_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `add_gem_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `each'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:299:in `add_gem_load_paths'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:132:in `process'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
    from /theapplicationdir/config/environment.rb:5
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:222:in `preload_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:181:in `initialize_server'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/utils.rb:572:in `report_app_init_status'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:174:in `initialize_server'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:180:in `start'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-3.0.8/helper-scripts/passenger-spawn-server:99

Rails 3 apps are booting and running fine. Anyone have any ideas on what the error is and how we can fix it?

For some environment information - we're using Phusion Passenger 3.0.8, Nginx and REE 1.8.7.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

咋地 2024-12-04 21:44:38

将应用程序升级到 2.3.12 可能会解决您在使用较新版本的 Ruby 时遇到的一些兼容性问题。维护版本通常会关注这些内容。

Upgrading your application to 2.3.12 may address some of the compatibility problems you're experiencing with a newer version of Ruby. The maintenance releases generally keep on top of these things.

生活了然无味 2024-12-04 21:44:38

对我来说,修复方法是降级 ruby​​gems:

$ gem update --system 1.3.6

For me the fix was to downgrade rubygems:

$ gem update --system 1.3.6
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文