如果我结帐或分叉the rails project on github,则在运行bundle install
时无法找到sprockets-rails时出错。如何安装这些宝石?
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.
答案 0 :(得分:0)
在你的宝石文件中写这个
gem "sprockets-rails", "1.0.0"
然后,捆绑安装
答案 1 :(得分:0)
好的,你想要这条路线:https://github.com/rails/rails-dev-box ...在活动开发期间无法使用bundler安装rails repo。
答案 2 :(得分:0)
Rubygems正在经历越来越多的痛苦和问题。目前依赖API已关闭。所以这是尝试通过rubygems解决依赖关系的失败。解决问题的AS,您可以在您的机器上手动安装所有要求,然后捆绑应使用本地副本。