V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
thcode
V2EX  ›  问与答

jekyll运行出错

  •  
  •   thcode · 2011-12-19 21:29:49 +08:00 · 4286 次点击
    这是一个创建于 4748 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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
    chloerei
        1
    chloerei  
       2011-12-19 21:37:20 +08:00
    bundle
    bundle exec jekyll
    thcode
        2
    thcode  
    OP
       2011-12-19 21:47:24 +08:00
    @chloerei 额,这个是什么意思?执行之后“Could not locate Gemfile”
    thcode
        3
    thcode  
    OP
       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
        4
    chloerei  
       2011-12-19 21:54:41 +08:00
    redcarpet 需要 1.9 以上版本

    gem install redcarpet -v "~> 1.9"
    chloerei
        5
    chloerei  
       2011-12-19 21:55:08 +08:00
    额……当我没说
    sparanoid
        6
    sparanoid  
    MOD
       2011-12-20 09:57:07 +08:00
    thcode
        7
    thcode  
    OP
       2011-12-21 01:16:50 +08:00
    @sparanoid 确实,把redcarpet版本降到1.17.2就解决了问题,版本兼容性真是折腾人……
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2951 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:40 · PVG 22:40 · LAX 06:40 · JFK 09:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.