无法在本地使用jekyll服务器运行bootstrap 3

时间:2013-04-20 12:14:08

标签: twitter-bootstrap jekyll twitter-bootstrap-3

我刚刚下载了twitter bootstrap branch 3.0.0-wip,并在编译时收到了错误。

我还下载了jekyll-boilerplate,并使用jekyll server成功投放。

我做错了吗?

已执行命令:

D:\Zain\github\bootstrap\source>jekyll --server

收到错误:

Configuration from D:/Zain/github/bootstrap/source/_config.yml
Building site: ./docs -> ./_gh_pages
Liquid Exception: wrong number of arguments (1 for 0) in docs.html
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl.rb:72:in 'initialize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl.rb:72:in 'new'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl.rb:72:in 'encode'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl.rb:22:in 'dump'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:225:in 'block in mentos'
C:/Ruby200/lib/ruby/2.0.0/timeout.rb:65:in 'timeout'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:209:in 'mentos'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:192:in 'highlight'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/tags/highlight.rb:54:in 'render_pygments'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/tags/highlight.rb:44:in 'render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:106:in 'block in render_all'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:93:in 'each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:93:in 'render_all'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:82:in 'render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/template.rb:124:in 'render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/template.rb:132:in 'render!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/convertible.rb:79:in 'do_layout'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/page.rb:100:in 'render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/site.rb:204:in 'block in render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/site.rb:203:in 'each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/site.rb:203:in 'render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/lib/jekyll/site.rb:41:in 'process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-0.12.1/bin/jekyll:264:in '<top (required)>'
C:/Ruby200/bin/jekyll:23:in 'load'
C:/Ruby200/bin/jekyll:23:in '<main>'
Build Failed

3 个答案:

答案 0 :(得分:0)

它接缝,它不适用于jekyll 2.0。尝试像1.9.3这样的旧版本。参见:

http://groups.google.com/forum/#!topic/rubyinstaller/yEuPjlPlMao

<强>更新

我找到了一个描述jekyll for windows安装的页面,请看这里:

http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html

更新2:

现在有一个GitHub项目:

https://github.com/juthilo/run-jekyll-on-windows

  

此存储库旨在为Windows用户提供成功运行Jekyll的说明 - 不仅在其创建时,而且希望将来,当常见解决方案再次过时时。

答案 1 :(得分:0)

如果您需要有关Bootstrap 3的所有文档,并且您不想安装Jekyll,请使用httrack到Windows并保存您想要的页面。在Youtube上搜索该程序。

答案 2 :(得分:0)

Update: For Bootstrap version 3.3.4

要在本地运行Twitter Bootstrap(v3.3.4)个文档,我执行了以下步骤,并希望它可以帮助其他人。

<强>步骤:

  • gem install jekyll(需要安装RubyRubygems
  • git clone --branch gh-pages git://github.com/twitter/bootstrap.git

    (现在gh-pages分支包含所有文档内容)

  • cd bootstrap
  • jekyll serve
  • 访问http://127.0.0.1:4000/默认服务器网址