在本地运行jekyll时出错(rvm gemset issue)

时间:2012-05-13 20:55:57

标签: ruby gem rvm jekyll

我通过RVM安装了ruby 1.9.3,现在想要获取rekyll gem,以便我可以在本地测试我的博客。当我gem install jekyll它正常运行时,但当我尝试运行jekyll --server时,我收到错误:

/Users/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find jekyll (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
    from /Users/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /Users/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:18:in `<main>'

当我gem list时,我可以在列表中看到它 - 任何想法出了什么问题?

我也试过RVMSUDO gem install jekyll无济于事。

如果它有任何用处,我的rvm信息:

system:

  system:
    uname:       "Darwin Matts-MacBook-Air.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)"

  rvm:
    version:      "rvm 1.13.2 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "8 days 23 hours 59 minutes 32 seconds ago"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/Users/matt/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
    irb:          "/Users/matt/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
    gem:          "/Users/matt/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
    rake:         "/Users/matt/.rvm/gems/ruby-1.9.3-p194@global/bin/rake"

  environment:
    PATH:         "/Users/matt/.rvm/gems/ruby-1.9.3-p194/bin:/Users/matt/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/matt/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/matt/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""

2 个答案:

答案 0 :(得分:4)

rvm use 1.9.3@test --create - 使用&amp;创建了宝石。

gem install jekyll - 安装gem。

最重要的一步是使用ruby rvm use 1.9.3。默认情况下,RVM应该使用并设置默认的第一个安装的ruby。

答案 1 :(得分:2)

您需要回到使用RVM的基础知识:

检查它们应该只需几分钟 - 它们应该可以避免进一步的混淆。