Home Articles

耙子流产了!使用Octopress时OSX上未初始化的常量Gem :: UserInteraction

Asked
Viewed 583 times
0

我使用Octopress写博客,今天当我通常使用commmand rake生成时出现错误弹出,我用Google搜索并说它可能是宝石版本问题,所以我试图更新但仍然有错误 . 所以任何人都可以给我一个建议?提前致谢 .

这是终端命令:

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:来自/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'的未初始化常量Gem :: UserInteraction(NameError)来自/ Library / Ruby / Site1.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:在 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 require'from /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 require'from /Library/Ruby/Site/1.8/ rubygems / command_manager.rb:来自/ Library / Ruby / Site / 7 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 Answer

  • 0

    我自己解决了这个问题 . Octopress需要Ruby 1.9.3或更高版本,但我使用的是Ruby 1.8 . 只需安装Ruby 1.9.3并使用命令 rbenv global 1.9.3-p0 即可解决此问题 .

Related