2015-09-10 103 views
0

我试图安装mongoid宝石在Rails 4之后these instructions(谷歌的第一个链接,和其他说明都说同样的事情)。安装mongoid宝石在轨道4

向我的Gemfile添加了以下几行并运行bundle install

gem 'mongoid', '~> 4', github: 'mongoid/mongoid' 
gem 'bson_ext' 

这给出了如下错误:

Fetching git://github.com/mongoid/mongoid.git 
fatal: unable to connect to github.com: 
github.com[0: 192.30.252.131]: errno=Connection refused 

Retrying git clone 'git://github.com/mongoid/mongoid.git' "/home/mike/.bundler/cache/git/mongoid-176c799a8a4589043b073e277e545d697119fa82" --bare --no-hardlinks --quiet due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/mongoid/mongoid.git' "/home/mike/.bundler/cache/git/mongoid-176c799a8a4589043b073e277e545d697119fa82" --bare --no-hardlinks --quiet` in directory /home/mike/shares has failed. 

mongoid/mongoid GitHub repository表示,它已经搬到了mongodb/mongoid。但将gem行更改为github: 'mongodb/mongoid'不能解决问题。

我在这里错过了一些明显的东西吗?

回答

1

的连接被拒绝的错误可能意味着你是一个防火墙阻止Git协议端口后,使用https:443可能是您的防火墙允许

您可以使用类似,

gem 'mongoid', :git => 'https://github.com/mongodb/mongoid.git'

+0

嗯仍给我的连接拒绝错误。 –

+1

你可以试试':git =>'https:// github.com/mongodb/mongoid.git''? – Kiloreux

+0

有趣的,工作,任何想法为什么? –