我正在关注Thoughtbot的TDD教程,它很棒,但有点过时了。一切正常,直到我尝试按照说明安装factory_girl_rails v 4.0 gem并运行bundle。 Factory Girl目前的版本为4.4.0,但研讨会是特定的,所以我尽量保留他们使用的版本。
Bundler说:
Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (link omitted b/c SO won't let me post it)
An error occurred while installing factory_girl (4.4.0), and Bundler cannot continue.
Make sure that `gem install factory_girl -v '4.4.0'` succeeds before bundling.
所以我这样做了:
gem install factory_girl_rails
ERROR: Could not find a valid gem 'factory_girl_rails' (>= 0), here is why:
Unable to download data from (link omitted b/c SO won't let me post it/) - Errno::ECONNRESET: Connection reset by peer - SSL_connect (link omitted b/c SO won't let me post it)
ERROR: Possible alternatives: factory_girl_rails
试图弄清楚这是否与我的连接有关。从我的gemfile&中取出这条线跑了捆绑,一切都很好。
搜索后发现可能问题是我的Ruby版本是1.9.3,所以我使用RVM更新到2.1.2。
现在当我运行bundle时,我得到了这个:
Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/rake-10.3.2.gem)
An error occurred while installing rake (10.3.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.3.2'` succeeds before bundling.
所以我试过了:
gem install rake -v '10.3.2'
ERROR: Could not find a valid gem 'rake' (= 10.3.2), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect
ERROR: Possible alternatives: rake
与gem install rake相同的错误
这是我的佣金版本:
rake --version
rake, version 10.1.0
我觉得我正在进入泥潭,并担心如果我继续徘徊,我最终会让事情变得更糟!看起来我应该回到Ruby v.1.9.3,但如果我运行
rvm --default use ruby-1.9
ruby-1.9.3-p547 is not installed.
安装do:rvm install ruby-1.9.3-p547
倒退似乎是一个坏主意。
答案 0 :(得分:0)
似乎某处可能存在ssl问题。我尝试在您的终端中运行rvm osx-ssl-certs update all
,然后重试。