运行gem install bundler时出错

时间:2014-02-09 20:00:37

标签: ruby-on-rails ruby gem bundle

我正在尝试安装bundler,但我得到以下内容:

/Library/Ruby/Site/1.8/rubygems/config_file.rb:39: uninitialized constant Gem::UserInteraction (NameError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1430:in `build_extensions'
from /Library/Ruby/Site/1.8/rubygems/stub_specification.rb:60:in `build_extensions'
from /Library/Ruby/Site/1.8/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:925:in `find_inactive_by_path'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:1031:in `find'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:924:in `each'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:924:in `find'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:924:in `find_inactive_by_path'
from /Library/Ruby/Site/1.8/rubygems.rb:185:in `try_activate'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:132:in `require'
from /Library/Ruby/Site/1.8/rubygems/user_interaction.rb:8
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/1.8/rubygems/command.rb:9
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/1.8/rubygems/command_manager.rb:7
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:8
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/bin/gem:9

任何人都知道我该如何解决?

谢谢!

修改:格式化

1 个答案:

答案 0 :(得分:2)

看起来你遇到了与this guy类似的问题,解决方案只是简单地转到https://rubygems.org/pages/download并手动下载,直到问题得到解决。