ruby-on-rails - 运行 "bundle install"失败,让我运行 "bundle install"

标签 ruby-on-rails ruby installation rvm bundle

事实上,当从我从 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/

相关文章:

ruby-on-rails - 使用 RSpec API 文档生成器,我可以漂亮地打印请求正文 JSON 吗?

ruby-on-rails - 为什么我们需要 Ruby Serializer 库?

ruby-on-rails - 在 env.rb 之外需要 Cucumber-rails。其余的加载被推迟到 env.rb 被调用

ruby - 在Grails Controller 中获取方法

windows - 如何安装痛饮?

ruby-on-rails - Rspec:检查系统调用的内容

ruby-on-rails - 有效的 TDD 策略包括哪些部分?

linux - 有什么方法可以找出使用的是哪个 Linux 发行版?

installation - 找不到安装程序的 .net 3.5 SP1 Bootstrapper

ruby-on-rails - Rails 模型和 Controller 命名语义?