2013-10-17 20 views
1

我有RailsInstaller與Ruby 2.0和Rails 4.0。我創建一個應用程序使用此:Rails Composer在Windows上不起作用。 SSL錯誤

$ 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' 

這是什麼? 非常感謝!

回答

3

here下載cacert.pem文件。將該文件保存到C:\ RailsInstaller \ cacert.pem。

現在通過設置SSL_CERT_FILE讓紅寶石知道您的證書權限包。要在當前的命令提示符會話中設置此項,請鍵入:

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

就是這樣。工作正常!

相關問題