使用Gemfile源运行bundler时: 来源'https://rubygems.org'
我收到此错误:
Resolving dependencies...
Network error while fetching
https://s3.amazonaws.com/production.s3.rubygems.org/quick/Marshal.4.8/pg-0.14.0-x86mingw32.gemspec.rz
如果我运行指定Gemfile源的命令: 来源'http://rubygems.org'
运行良好。有什么想法吗?
使用bundler(1.3.5)。
答案 0 :(得分:0)
事实证明,使用和旧版本的rubygems会导致这种情况。
答案 1 :(得分:0)
您可以使用Bundler网站(http://bundler.io/issues.html)中的一些步骤解决此问题:
# remove user-specific gems and git repos
rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/
# remove system-wide git repos and git checkouts
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
# remove project-specific settings
rm -rf .bundle/
# remove project-specific cached gems and repos
rm -rf vendor/cache/
# remove the saved resolve of the Gemfile
rm -rf Gemfile.lock
# uninstall the rubygems-bundler and open_gem gems
rvm gemset use global # if using rvm
gem uninstall rubygems-bundler open_gem
# try to install one more time
bundle install