gpt4 book ai didi

ruby-on-rails - Rails Composer 不能在 Windows 上运行。 SSL错误

转载 作者:太空宇宙 更新时间:2023-11-03 18:20:29 26 4
gpt4 key购买 nike

我有带 Ruby 2.0 和 Rails 4.0 的 RailsInstaller。我用这个创建了一个应用程序:

$ rails new myapp -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb

然后我得到了这个:

apply  https://raw.github.com/RailsApps/rails-composer/master/composer.rb
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `connect'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/net/http.rb:851:in `start'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:313:in `open_http'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:708:in `buffer_open'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:688:in `open'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/open-uri.rb:34:in `open'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/actions.rb:216:in `apply'

这是什么?非常感谢!

最佳答案

here 下载 cacert.pem 文件.将此文件保存到 C:\RailsInstaller\cacert.pem。

现在通过设置 SSL_CERT_FILE 让 ruby​​ 知道你的证书授权包。要在您当前的命令提示符 session 中进行设置,请键入:

  $  set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem

就是这样。工作正常!

关于ruby-on-rails - Rails Composer 不能在 Windows 上运行。 SSL错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19429981/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com