无法在 Windows 上运行捆绑更新 [英] Can't run bundle update on Windows
问题描述
每当我在 Windows 8.1 上运行捆绑更新或捆绑安装时,我都无法从 github 更新/安装 gem.我可以安装其他 gem,例如 uglifier,但它不适用于 github gem.例如,把它放在 Gemfile 中
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
导致错误:
Retrying source fetch due to error (2/3): You need to install git to be able to use gems from git repositories.
问题是我肯定安装了 git.我从 Git Bash 运行它,并在一个我正在克隆、拉取和使用 Git 的项目中工作.那么为什么捆绑更新/安装一直坚持说我没有安装 git?如何修复它并使捆绑安装工作?
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?
推荐答案
您正在运行 Bundler 的预发布版本吗?此提交可能与您的问题有关;它看起来像早期版本的 Bundler 扫描你的 %PATH% 寻找git",但不是git.exe".
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".
最简单的解决方案是将捆绑程序反向移植到 1.3.5:
The easiest solution would be to backport bundler to 1.3.5:
gem uninstall bundler
gem install bundler
这篇关于无法在 Windows 上运行捆绑更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!