创建Jekyll项目时出错

时间:2018-08-21 15:36:33

标签: ruby-on-rails ruby jekyll

运行jekyll new .时出现此错误:

Traceback (most recent call last):
    11: from /usr/local/bin/jekyll:23:in `<main>'
    10: from /usr/local/bin/jekyll:23:in `load'
     9: from /var/lib/gems/2.5.0/gems/jekyll-3.8.3/exe/jekyll:8:in `<top (required)>'
     8: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
     7: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
     6: from /var/lib/gems/2.5.0/gems/jekyll-3.8.3/lib/jekyll.rb:33:in `<top (required)>'
     5: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
     4: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
     3: from /var/lib/gems/2.5.0/gems/addressable-2.5.2/lib/addressable/uri.rb:21:in `<top (required)>'
     2: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
     1: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require': cannot load such file -- public_suffix (LoadError)
仅针对jekyll new .jekyll new blog

错误成功运行 (我测试了jekyll new . --force,但问题尚未解决

我的路径是:

/home/shahrvand/.nvm/versions/node/v8.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/shahrvand/.gem/ruby/2.5.0

我的红宝石版本是:

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
gem version : 2.7.7
jekyll 3.8.3

我正在使用Ubuntu 18.04。这个错误是什么意思?

1 个答案:

答案 0 :(得分:0)

好像您缺少public_suffix宝石。尝试通过gem install public_suffix安装或将其放入Gemfile,然后重新运行bundle install