我尝试过几次与Jekyll建立博客,并且在多个版本的OSX,Ruby等中遇到过这个问题。运行之后:
jekyll new myblog
我收到此错误:
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2054: warning: else without rescue is useless
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2060: warning: else without rescue is useless
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2099: warning: else without rescue is useless
/Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require': /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2050: syntax error, unexpected modifier_if (SyntaxError)
if separator.value == 'auto'
^
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2054: syntax error, unexpected ',', expecting keyword_end
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2060: syntax error, unexpected ')', expecting keyword_end
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2095: syntax error, unexpected modifier_if
if separator.value == 'auto'
^
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2099: syntax error, unexpected ')', expecting keyword_end
/Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script/functions.rb:2885: syntax error, unexpected keyword_end, expecting end-of-input
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script.rb:34:in `<module:Script>'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script.rb:8:in `<module:Sass>'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/script.rb:3:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass/engine.rb:47:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/sass-3.5.1/lib/sass.rb:99:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/jekyll-sass-converter-1.5.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3@global/gems/jekyll-sass-converter-1.5.0/lib/jekyll-sass-converter.rb:2:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/gems/jekyll-3.8.3/lib/jekyll.rb:200:in `<top (required)>'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/rubies/ruby-2.1.3/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/gems/jekyll-3.8.3/exe/jekyll:8:in `<top (required)>'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/bin/jekyll:23:in `load'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/bin/jekyll:23:in `<main>'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/NuriAmari/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
我正在运行High Sierra v 10.13.3并尝试了我能找到的所有故障排除建议。提前谢谢。
编辑:
我实际上已经安装了最新版本的Ruby,但重新安装只是为了确定。我现在尝试创建一个新的jekyll站点时出现此错误:
/Users/NuriAmari/.rvm/gems/ruby-2.1.3/bin/jekyll: No such file or directory
还有其他提示吗?
答案 0 :(得分:1)
你需要升级ruby版本我检查它的工作情况为2.3.4
当我试图将它用于2.1.3
时,我收到了错误:
ERROR: Error installing jekyll:
ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.