事实上,当从我从 git 存储库克隆的现有 Rails 应用程序中运行时,所有与 gem 相关的命令都会产生相同的错误消息。
$ 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.
我以为我已经安装了 rails...(以下命令是从 app 目录外运行的):
$ rails -v
Rails 3.0.3
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
知道“bundle install”告诉我运行“bundle install”是怎么回事吗??
我退出了我的应用程序目录并手动完成
sudo gem install tzinfo -v 0.3.27
但是再次进入我的应用程序目录并尝试“bundle 安装”...
$ bundle install
Could not find polyglot-0.3.1 in any of the sources
Run `bundle install` to install missing gems.
所以我回到了app目录,做了
sudo gem install polyglot -v 0.3.1
“bundle 安装”现在产生了
$ bundle install
Could not find treetop-1.4.9 in any of the sources
Run `bundle install` to install missing gems.
为什么我必须手动安装过去不需要的所有这些随机 gem? (新的开发环境)。任何人都知道我在我的环境中可能设置错误的地方吗?
最佳答案
好吧,我猜我修好了..
对于运行 bundle install
时从 app 目录中运行时提示的 gem,我通过在 app 目录之外执行 sudo gem install [gem]
安装它们> 一个接一个。执行 bundle install --gemfile=myApp/Gemfile
还安装了一些缺失的 gem。
我不知道为什么我不能从 app 目录中运行 bundle install
...很差劲。
关于ruby-on-rails - 运行 "bundle install"失败,让我运行 "bundle install",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6971290/