0

如果我在 github 上签出或分叉rails 项目,运行时会出现错误,bundle install找不到 sprockets-rails。如何安装这些 gem?

new-host-4:rails scott$ bundle install
Updating git://github.com/rails/arel.git
Updating git://github.com/brynary/rack-test.git
Updating git://github.com/rails/jquery-rails.git
Updating git://github.com/rails/coffee-rails.git
Updating git://github.com/rails/journey.git
Updating git://github.com/rails/activerecord-deprecated_finders.git
Updating git://github.com/rails/sprockets-rails.git
Updating git://github.com/fxn/sdoc.git
Fetching gem metadata from https://rubygems.org/.
Error Bundler::HTTPError during request to dependency API
Fetching full source index from https://rubygems.org/
Could not find gem 'sprockets-rails (~> 2.0) ruby', which is required by gem 'rails (>= 0) ruby', in any of the sources.
4

3 回答 3

0

在你的 gem 文件中试试这个写

gem "sprockets-rails", "1.0.0"

然后,捆绑安装

于 2012-10-23T08:25:48.777 回答
0

好的,那么你想走这条路:https ://github.com/rails/rails-dev-box ...在积极开发期间,rails repo 不能与 bundler 一起安装。

于 2012-10-23T18:31:12.100 回答
0

http://status.rubygems.org

Rubygems 正在经历成长的痛苦和问题。目前依赖 API 已关闭。所以这是它试图通过 ruby​​gems 解决依赖关系的失败。至于解决它,您可以在您的机器上手动安装所有要求,然后捆绑应该使用本地副本。

于 2012-10-23T18:35:10.493 回答