无法在Windows上运行软件包更新 [英] Can't run bundle update on Windows

查看:116
本文介绍了无法在Windows上运行软件包更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论何时我在Windows 8.1上运行软件包更新或软件包安装,我都无法从github更新/安装gems。我可以安装其他像uglifier这样的宝石,但它并不适用于github gems。例如,把它放在Gemfile中
$ b

  group:development,:test do 
gem'rspec-rails', '2.13.1'
gem'spork-rails',github:'sporkrb / spork-rails'
end

会导致以下错误:

 由于错误而重试源提取(2/3):你需要安装git才能够使用git仓库中的gem。 

问题是我绝对要安装git。我从Git Bash开始运行这个项目,并在一个我正在克隆,拉扯和与Git合作的项目中工作。那么为什么bundle update / install会坚持我没有安装git?我该如何解决这个问题,并使捆绑包安装工作? 你正在运行Bundler的预发布版本吗? 此提交可能与您的问题有关;它看起来像早期版本的Bundler 扫描%PATH%为git ,而不是git.exe。



最简单的解决方案是将捆绑器反向移植到1.3.5:

  gem uninstall bundler 
gem install bundler


Whenever I run bundle update or bundle install on Windows 8.1 I can't update/install gems from github. I can install other gems like uglifier, but it doesn't work for github gems specifically. For example, putting this in the Gemfile

group :development, :test do
  gem 'rspec-rails', '2.13.1'
  gem 'spork-rails', github: 'sporkrb/spork-rails'
end

results in the error:

Retrying source fetch due to error (2/3): You need to install git to be able to use gems from git repositories.

The problem is I definitely have git installed. I was running this from Git Bash and working in a project that I was cloning, pulling, and working with off of Git. So why does the bundle update/install keep insisting that I don't have git installed? How do I fix it and make bundle install work?

解决方案

Are you running a pre-release version of Bundler? This commit might be related to your problem; it looks like earlier versions of Bundler scan your %PATH% for "git", but not "git.exe".

The easiest solution would be to backport bundler to 1.3.5:

gem uninstall bundler
gem install bundler

这篇关于无法在Windows上运行软件包更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆