Bundler无法在任何来源中找到宝石

时间:2013-08-26 21:45:54

标签: ruby bundler

我试图运行Middleman并收到以下错误:

$ middleman
WARN: Unresolved specs during Gem::Specification.reset:
  thor (< 2.0, >= 0.15.2)
  multi_json (~> 1.0)
  rb-inotify (>= 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Could not find i18n-0.6.1 in any of the sources
Run `bundle install` to install missing gems

所以我跑了bundle install,这是输出的相关部分:

$ bundle install
Using i18n (0.6.1)
...
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle

$ middleman
...
Could not find i18n-0.6.1 in any of the sources
Run `bundle install` to install missing gems.

$ bundle show
Gems included by the bundle:
...
* i18n (0.6.1)
...

$ bundle show i18n
/Users/jh/Documents/Workspace/mywebsite-middleman/vendor/bundle/ruby/1.8/gems/i18n-0.6.1

有人知道这里发生了什么吗?我一直在运行bundle installbundle install --deployment,就像消息所说的那样,它拒绝工作。

1 个答案:

答案 0 :(得分:3)

听起来您已将中间人gem添加到Gemfile并使用bundle install安装。

如果是这种情况,您应该将中间人作为bundle exec middleman运行。这将确保作为bundle install的一部分安装的所有其他宝石都可供中间人使用。