当我在计算机上从https://github.com/daattali/beautiful-jekyll.git克隆项目时,我使用jekyll serve来启动项目,但是会出现一些错误,如果我想使用jekyll进行本地开发,我该怎么办?
错误是:
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
rouge (< 3, >= 1.7)
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:313:in `check_for_activated_spec!': You have already activated public_suffix 3.0.1, but your Gemfile requires public_suffix 2.0.5. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:31:in `block in setup'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/2.4.0/forwardable.rb:229:in `each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-`enter code here`1.16.0/lib/bundler/runtime.rb:26:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler.rb:107:in `setup'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/exe/jekyll:11:in `<top (required)>'
from C:/Ruby24-x64/bin/jekyll:23:in `load'
from C:/Ruby24-x64/bin/jekyll:23:in `<main>'
我已经解决了我的问题。首先:您应该将代码添加到Gemfile文件中。代码是
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
然后:你用bundle exec jekyll serve
开始。之后,您可以使用本地开发。