jekyll运行出错

2011-12-19 21:29:49 +08:00
 thcode
Ruby版本:1.9.2p290
gem版本:1.8.10
使用rvm安装的Ruby。
然后使用gem安装jekyll,以及redcarpet

运行jekyll是输出错误log如下:

Configuration from /Users/thcode/Code/thcode.github.com/_config.yml
Building site: /Users/thcode/Code/thcode.github.com -> /Users/thcode/Code/thcode.github.com/_site
/Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/converters/markdown.rb:91:in `convert': undefined method `new' for Redcarpet:Module (NoMethodError)
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:46:in `transform'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:84:in `do_layout'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/post.rb:189:in `render'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:193:in `block in render'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:192:in `each'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:192:in `render'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:40:in `process'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:250:in `<top (required)>'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `load'
from /Users/thcode/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `<main>'

这个问题困扰我好久,有谁有解决方案吗?
4203 次点击
所在节点    问与答
7 条回复
chloerei
2011-12-19 21:37:20 +08:00
bundle
bundle exec jekyll
thcode
2011-12-19 21:47:24 +08:00
@chloerei 额,这个是什么意思?执行之后“Could not locate Gemfile”
thcode
2011-12-19 21:48:33 +08:00
*** LOCAL GEMS ***

albino (1.3.3)
bundler (1.0.21 ruby)
classifier (1.3.3)
directory_watcher (1.4.1)
fast-stemmer (1.0.0)
jekyll (0.11.0)
kramdown (0.13.4)
liquid (2.3.0)
maruku (0.6.0)
multi_json (1.0.4)
posix-spawn (0.3.6)
rake (0.9.2)
redcarpet (2.0.1)
syntax (1.0.0)

这个是目前安装的gem,redcarpet已经有了,但是出现以上的错误
chloerei
2011-12-19 21:54:41 +08:00
redcarpet 需要 1.9 以上版本

gem install redcarpet -v "~> 1.9"
chloerei
2011-12-19 21:55:08 +08:00
额……当我没说
sparanoid
2011-12-20 09:57:07 +08:00
thcode
2011-12-21 01:16:50 +08:00
@sparanoid 确实,把redcarpet版本降到1.17.2就解决了问题,版本兼容性真是折腾人……

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/23854

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX