这是一个创建于 4734 天前的主题,其中的信息可能已经有所发展或是发生改变。
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>'
这个问题困扰我好久,有谁有解决方案吗?
7 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
chloerei 2011-12-19 21:37:20 +08:00
bundle bundle exec jekyll
|
|
|
2
thcode 2011-12-19 21:47:24 +08:00
@ chloerei 额,这个是什么意思?执行之后“Could not locate Gemfile”
|
|
|
3
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已经有了,但是出现以上的错误
|
|
|
4
chloerei 2011-12-19 21:54:41 +08:00
redcarpet 需要 1.9 以上版本
gem install redcarpet -v "~> 1.9"
|
|
|
5
chloerei 2011-12-19 21:55:08 +08:00
额……当我没说
|
|
|
7
thcode 2011-12-21 01:16:50 +08:00
@ sparanoid 确实,把redcarpet版本降到1.17.2就解决了问题,版本兼容性真是折腾人……
|