用这个简单的Gemfile,
source 'https://rubygems.org'
gem 'activerecord', "~> 2.2.3"
gem 'activerecord-sqlserver-adapter', github: 'arthrex/activerecord-sqlserver-adapter', :branch => '2-3-stable'
bundle install
失败了
Fetching git://github.com/arthrex/activerecord-sqlserver-adapter.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=No error
Git error: command `git clone
"git://github.com/arthrex/activerecord-sqlserver-adapter.git"
"c:/Languages/Ruby/1.9.3/lib/ruby/gems/1.9.1/cache/bundler/git/activerecord-sqlserver-adapter-8019982c6a12a1297e8a135275
d94bdee6cd893b"
--bare --no-hardlinks` in directory c:/Users/BZISAD0/Code/CSV has failed.
起初,我以为我的代理配置搞砸了,但我可以执行这个命令,没有问题:
$ git clone http://github.com/arthrex/activerecord-sqlserver-adapter.git
然而,对于git协议,它失败了:
$ git clone git://github.com/arthrex/activerecord-sqlserver-adapter.git
Cloning into 'activerecord-sqlserver-adapter'...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=No error
因此,我推断代理对git协议没有好感。无论如何,不管出于什么原因,http都能正常工作,但git协议却不是。
有办法解决这个问题吗?例如,在我的http://
中配置git://
而不是git://
发布于 2013-12-19 10:23:35
不要在Gemfile中使用github:
短格式,只需使用常规的git:
语法
gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git'
https://stackoverflow.com/questions/20688914
复制相似问题