我使用Octopress写博客,今天当我通常使用commmand rake生成时出现错误弹出,我用谷歌搜索它说可能是宝石版本问题,所以我试图更新但仍然有错误。所以任何人都可以给我一个建议? 提前谢谢。
这是终端命令:
stevenlordiam:octopress stevenlordiam $ rake generate
耙子流产了! 未初始化的常量Gem :: UserInteraction(通过使用--trace运行任务查看完整跟踪)
stevenlordiam:octopress stevenlordiam $ sudo gem update --system
密码:
/Library/Ruby/Site/1.8/rubygems/config_file.rb:39:未初始化的常量Gem :: UserInteraction(NameError)
来自/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
要求'
来自/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'
来自/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'
来自/Library/Ruby/Site/1.8/rubygems/specification.rb:1031:in find'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:924:in
每个'
来自/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'
来自/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
要求'
来自/Library/Ruby/Site/1.8/rubygems/user_interaction.rb:8
来自/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
要求'
来自/Library/Ruby/Site/1.8/rubygems/command.rb:9
来自/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
要求'
来自/Library/Ruby/Site/1.8/rubygems/command_manager.rb:7
来自/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
要求'
来自/Library/Ruby/Site/1.8/rubygems/gem_runner.rb:8
来自/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
要求'
来自/ usr / bin / gem:9
答案 0 :(得分:0)
rbenv global 1.9.3-p0
即可解决此问题。