Ich führe eine Rails 2.3.5-Anwendung aus und beim Ausführen von Skript / Server wird Folgendes angezeigt:
./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
Wenn ich Zeile 60 in boot.rb (Rails :: GemDependency.add_frozen_gem_path) auskommentiere und script / server ausführe, erhalte ich Folgendes:
=> 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
Also nicht wirklich sicher, was ich tun soll. Ich hoffe, ich kann schnell Hilfe bekommen. Vielen Dank!
quelle
rvm rubygems latest-1.8
Rubygems herunterstufen und dieses Problem beheben.rvm rubygems --force latest-1.8
für rvm benutzer
quelle
Dies hat mir geholfen: http://djellemah.com/blog/2013/02/27/rails-23-with-ruby-20/
Ich habe dies in Kombination mit getan
gem update --system 1.8.25
, was für Ihren Fall möglicherweise nicht erforderlich ist.quelle
Eine andere Möglichkeit, dies zu tun, besteht darin, slimgems zu installieren :
gem install slimgems
. Dies ist eine Drop-In-Gabel von RubyGems, die mit alten Versionen besser funktioniert.quelle