Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: "fatal: I don't handle protocol ``git` when using bundle install

I have the following line in my GemFile :

gem 'rails', :git => 'git://github.com/rails/rails.git'

I get the following error:

Fetching git://github.com/rails/rails.git
fatal: I don't handle protocol ''git'
Git error: command `git clone 'git://github.com/rails/rails.git'...

but when I run gem install 'rails' it works fine.

basically when running the clone command, bundler adds the single quotes around the git:// address which throws the error.

I am working on windows. Any ideas why I am getting this error?

Cheers

like image 684
neebz Avatar asked Nov 14 '22 22:11

neebz


1 Answers

Try this instead in your Gemfile:

gem 'rails', :git => "https://github.com/rails/rails.git"

git:// can sometimes be blocked by firewalls. Though in your case that's probably not the issue. Try double quotes instead.

like image 106
Jits Avatar answered Dec 06 '22 23:12

Jits