更新宝石并清理旧版本后,rails 2.3.11应用程序不再在生产中重新启动。
这来自Apache日志:
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /var/www/vhosts/infinitize.com/subdomains/support/rails/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
*** Exception NoMethodError in PhusionPassenger::Railz::ApplicationSpawner (undefined method `full_name' for nil:NilClass) (process 19800):
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:178:in `add_spec'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in `initialize'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in `initialize'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:960:in `new'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:960:in `_deprecated_source_index'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:39:in `skip_during'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:959:in `_deprecated_source_index'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `send'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `source_index'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/vendor/rails/railties/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/config/boot.rb:47:in `load_initializer'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/config/boot.rb:38:in `run'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/config/boot.rb:11:in `boot!'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/config/boot.rb:122
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/www/vhosts/infinitize.com/subdomains/support/rails/config/environment.rb:11
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb:299:in `preload_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb:248:in `initialize_server'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/utils.rb:255:in `report_app_init_status'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb:233:in `initialize_server'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb:194:in `start_synchronously'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb:163:in `start'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/bin/passenger-spawn-server:61
有人知道吗? 我一直在升级/降级rubygems-update,但我一直收到这个错误:
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
答案 0 :(得分:0)
远景但你可能在你的宝石文件中有这样的东西......
gem'mysql'
改为......
gem'ruby-mysql'