我運行一個Rails 2.3.5應用和一旦運行腳本/服務器我示出以下內容:未定義的方法`source_index」的寶石:模塊(NoMethodError)
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path': undefined method `source_index' for Gem:Module (NoMethodError)
from ./script/../config/boot.rb:60:in `load_initializer'
from ./script/../config/boot.rb:44:in `run'
from ./script/../config/boot.rb:17:in `boot!'
from ./script/../config/boot.rb:123
from script/server:2:in `require'
from script/server:2
如果我註釋掉線60在的boot.rb(滑軌:: GemDependency.add_frozen_gem_path)和運行腳本/服務器,我得到這個:
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path': undefined method `source_index' for Gem:Module (NoMethodError)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:298:in `add_gem_load_paths'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:132:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /home/developer/bigpink/config/environment.rb:13
from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /home/developer/bigpink/vendor/rails/railties/lib/commands/server.rb:84
from script/server:3:in `require'
from script/server:3
所以,真的不知道該怎麼做。希望我能得到一些快速的幫助。謝謝!
太謝謝你了!它工作完美。是的,謝謝,我正在升級到2.3.17,然後升級到最新的3.x. – noodleboy347 2013-03-12 21:38:44
@uxp這個問題的任何提示:http://stackoverflow.com/questions/15374188/why-is-my-rake-call-causing-an-undefined-method-source-index-error/15378764 – Evolve 2013-03-13 07:03:26
寶石更新 - -system 1.8.25 – mmell 2013-03-15 16:14:33