2013-08-26 47 views
1

我试图运行中间人和我得到以下错误:捆扎机不能在任何的来源找到宝石

$ 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,就像消息说的那样,它拒绝工作。

+0

你试过bundle exec middleman吗? – diedthreetimes

+0

为什么要将gem安装到'vendor/bundle'? –

+0

'bundle exec middleman'给了我同样的错误信息(但不是之前有关清除未解决规范的警告)。 我不知道为什么它将gem安装到'vendor/bundle',这是Middleman附带的设置。 – jay

回答

3

这听起来像是你已经将中间人宝石添加到Gemfile并使用bundle install进行安装。

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

相关问题