2

我通过 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:       ""
4

2 回答 2

4

rvm use 1.9.3@test --create- 使用和创建 gemset。

gem install jekyll- 安装宝石。

最重要的一步是使用 rubyrvm use 1.9.3​​ 。默认情况下,RVM 应该使用并设置默认首先安装的 ruby​​。

于 2012-05-14T19:48:42.840 回答
2

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

检查它们应该只有几分钟的时间——它们应该可以让你避免进一步的混淆。

于 2012-05-14T21:25:19.593 回答