运行“捆绑安装”失败,并要求我运行“捆绑安装” [英] Running "bundle install" fails and asks me to run "bundle install"
问题描述
实际上,从我从git repo克隆的现有rails应用程序内部运行时,所有与gem相关的命令都导致相同的错误消息。
In fact, all gem-related commands result in the same error message, when run from inside the existing rails app I cloned from a git repo.
$ bundle install
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.
$ gem list
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.
$ bundle update
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.
$ rails -v
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.
我以为我已经安装了滑轨... (以下命令是从应用目录之外运行的):
I thought I already had rails installed... (following commands were run from outside the app directory):
$ rails -v
Rails 3.0.3
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
任何人都知道捆绑安装是怎么回事,告诉我运行捆绑安装吗?
Any idea what's up with "bundle install" telling me to run "bundle install"??
我退出了应用目录并手动完成
I exited my app directory and manually did
sudo gem install tzinfo -v 0.3.27
但是再次进入我的应用程序目录并尝试捆绑安装 ...
But upon entering my app directory again and trying "bundle install"...
$ bundle install
Could not find polyglot-0.3.1 in any of the sources
Run `bundle install` to install missing gems.
所以我回到了应用目录,做了
So I went back out of the app directory, did
sudo gem install polyglot -v 0.3.1
现在已产生捆绑安装
$ bundle install
Could not find treetop-1.4.9 in any of the sources
Run `bundle install` to install missing gems.
为什么我必须手动安装所有过去不需要的随机gem ? (新的开发环境)。有人知道我在我的环境中可能设置了什么错误吗?
Why am I having to manually install all these random gems that I didn't have to in the past? (new dev env). Anyone know what I could have set up wrong in my environment?
推荐答案
好吧,我猜对了。.
对于运行捆绑安装的宝石
从app目录中运行时抱怨的问题,我通过在app目录之外安装了它们分别进行 sudo gem install [gem]
。进行捆绑安装--gemfile = myApp / Gemfile
还安装了一些缺少的宝石。
For the gems that running bundle install
complained about when run from inside the app directory, I installed them by going outside the app directory and doing sudo gem install [gem]
one by one. Doing bundle install --gemfile=myApp/Gemfile
also installed a couple of the missing gems.
我没有知道为什么我不能只从应用程序目录中运行 bundle install
... lam。
I have no idea why I wasn't able to just run bundle install
from inside the app directory...lame.
这篇关于运行“捆绑安装”失败,并要求我运行“捆绑安装”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!