【发布时间】:2011-08-07 07:07:56
【问题描述】:
事实上,当从我从 git repo 克隆的现有 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]
知道“捆绑安装”告诉我运行“捆绑安装”是怎么回事吗??
我退出了我的应用目录并手动退出了
sudo gem install tzinfo -v 0.3.27
但是再次进入我的应用目录并尝试“捆绑安装”...
$ bundle install
Could not find polyglot-0.3.1 in any of the sources
Run `bundle install` to install missing gems.
所以我退出了应用程序目录,是的
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? (新的开发环境)。任何人都知道我在我的环境中设置的错误吗?
【问题讨论】:
-
您的 Gemfile 中有什么,是否包含
source 'http://rubygems.org'? -
它包含源:rubygems,添加源 'rubygems.org' 没有帮助,同样的错误。
-
另外...事实证明我可以运行
bundle install --gemfile=myApp/Gemfile,但它因另一个错误而失败(我认为不相关)。为什么我不能从 app 目录中运行 bundle install?
标签: ruby-on-rails ruby installation rvm bundle