我该怎么做才能使用本地开发?

时间:2017-12-19 02:24:16

标签: github jekyll

当我从计算机上的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>'

1 个答案:

答案 0 :(得分:0)

我已经解决了我的问题。 首先:您应该将代码添加到Gemfile文件中。 代码是

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

然后:您使用bundle exec jekyll serve开始。之后,您可以使用本地开发。