gem update --system之后的错误

时间:2013-03-06 15:22:36

标签: ruby-on-rails gem rvm rack-pow

我在Rails应用程序上使用Ruby上的OSX。使用RVM管理ruby。我刚刚做了:

gem update --system

我认为这是你偶尔需要做的事情。但似乎这已经打破了一些东西。当我开始我的应用程序(我使用Pow)时,我看到了这些错误:

Error starting application
Your Rack app raised an exception when Pow tried to run it.

NameError: uninitialized constant Gem::SourceIndex
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170'
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems'
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints'
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/runtime.rb:14:in `setup'
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler.rb:116:in `setup'
~/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/setup.rb:17:in `<top (required)>'
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'  
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require' ~/Sites/mafticket/config/boot.rb:6:in `<top 
(required)>' ~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' 
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' ~/Sites/mafticket/config/application.rb:1:in `<top 
(required)>' ~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' 
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' ~/Sites/mafticket/config/environment.rb:2:in `<top 
(required)>' ~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' 
~/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require' ~/Sites/mafticket/config.ru:3:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval' ~/Library/Application
Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize' ~/Sites/mafticket/config.ru:1:in `new' ~/Sites/mafticket/config.ru:1:in 
`<main>' ~/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:50:in `eval' ~/Library/Application
Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:50:in `load_config' ~/Library/Application
Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:43:in `initialize' ~/Library/Application
Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:13:in `new' ~/Library/Application
Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:13:in `run' ~/Library/Application  
Support/Pow/Versions/0.4.0/node_modules/nack/bin/nack_worker:4:in `<main>'

我有什么问题或者我应该重新开始吗? 我可以撤消吗?

由于

2 个答案:

答案 0 :(得分:3)

很棒的反馈,谢谢

通过输入以下内容我似乎解决了我的问题:

gem update bundler

答案 1 :(得分:2)

而不是gem update --system尝试:

rvm use ruby-1.9.3-p362
rvm rubygems latest

区别可能是第一个命令将获得rubygems-2.0 +并且除了ruby-2.0.0之外,所有红宝石的RVM仍保持1.8 +