`bundle install`失败(因为git协议)
有了这个简单的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协议却没有。
有办法解决这个问题吗? 例如,在我的~/.gitconfig
配置http://
而不是git://
~/.gitconfig
?
不要在你的Gemfile中使用github:
short表单,只需使用常规的git:
语法
gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git'
- Bundle install在./mysql2文件夹中安装gem
- 使用RVM时,如果gem安装在不同的ruby版本中,则bundler不会安装在正确的gemset中
- RVM和瘦,root与本地用户
- 安装gem时停止询问密码
- 如何让bundler使用chruby和.ruby-version设置的Ruby版本?
- Rails3服务器和bundler错误:未初始化的常量Bundler(NameError)
- 为什么’rspec spec’比’bundle exec spec’运行得更快,使用的资源更少
- 在Ruby on Rails中,在“gem install ”之后,如何使它扩展Array,或者使用它的类方法?
- 〜>符号在捆绑器Gemfile中的含义是什么?