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
Don't forget to select radio "Use git from Windows Command Prompt" while installing the Git. Thats the key!
By default "Use git from Git Bash only" is set.
For me it was also the path, with space and accent, I guess that was the accent the issue. installed the bundler 1.6-pre, uninstalled git, reinstalled it in C:\Git, changed the path of git in my IDE (RubyMine) and finally installed every gems using bundle install.
Thanks a lot!
While on Windows, if you're still getting that error after installing git too, make sure to close the 'CMD' instance and open it again, the system paths vars have been set, but not instantiated in the active 'CMD' window.