当我尝试运行github-pages(bundle exec jekyll build)时,它失败了:
bundle exec jekyll build
/usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:365:in `block in require_program': program version required (Commander::Runner::CommandError)
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:364:in `each'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:364:in `require_program'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:52:in `run!'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>': undefined method `tagged_classes' for Psych:Module (NoMethodError)
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/bin/jekyll:7:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/bin/jekyll:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/bin/jekyll:23:in `load'
from /usr/local/rvm/gems/ruby-2.2.4/bin/jekyll:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'
Gemfile是:
source 'https://rubygems.org'
gem 'github-pages'
gem 'guard-jekyll-plus'
知道可能出现什么问题吗?我在Mac上安装了多次(捆绑安装)。这是在Ubuntu上。
提前致谢,
伊恩
答案 0 :(得分:1)
好的,我想到这一点,感谢Virtua Creative,这篇文章:https://github.com/sstephenson/execjs/issues/154
我需要卸载jekyll和github-pages,然后重新安装,重新安装后我也不得不更新,所以:
gem uninstall jekyll
gem uninstall github-pages
bundle install
bundle update
然后我发现我没有javascript环境,所以我不得不修改我的Gemfile:
source 'https://rubygems.org'
gem 'github-pages'
gem 'therubyracer'
再次安装
bundle install
现在一切都很好。
伊恩