我在 1.9 模式下运行带有 jruby 1.7.0 的 rails 3 应用程序,当我的一个文件上传 gem 尝试建立 https 连接时,它失败并出现以下异常:
Excon::Errors::SocketError: write would raise (OpenSSL::SSL::SSLError)
from org/jruby/ext/openssl/SSLSocket.java:626:in `syswrite_nonblock'
from /home/x/.rvm/gems/jruby-1.7.0@global/gems/jruby-openssl-0.7.7/lib/1.9/openssl/buffering.rb:375:in `write_nonblock'
from /home/x/.rvm/gems/jruby-1.7.0/gems/excon-0.16.7/lib/excon/socket.rb:139:in `write'
from /home/x/.rvm/gems/jruby-1.7.0/gems/excon-0.16.7/lib/excon/ssl_socket.rb:84:in `write'
from /home/x/.rvm/gems/jruby-1.7.0/gems/excon-0.16.7/lib/excon/connection.rb:243:in `request_kernel'
from /home/x/.rvm/gems/jruby-1.7.0/gems/excon-0.16.7/lib/excon/connection.rb:103:in `request'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/core/connection.rb:20:in `request'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/rackspace.rb:71:in `authenticate'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/rackspace/storage.rb:146:in `authenticate'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/rackspace/storage.rb:95:in `initialize'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/core/service.rb:68:in `new'
from /home/x/.rvm/gems/jruby-1.7.0/gems/fog-1.7.0/lib/fog/storage.rb:34:in `new'
from /home/x/.rvm/gems/jruby-1.7.0/gems/carrierwave-0.6.2/lib/carrierwave/storage/fog.rb:106:in `connection'
from /home/x/.rvm/gems/jruby-1.7.0/gems/carrierwave-0.6.2/lib/carrierwave/storage/fog.rb:323:in `connection'
from /home/x/.rvm/gems/jruby-1.7.0/gems/carrierwave-0.6.2/lib/carrierwave/storage/fog.rb:335:in `directory'
from /home/x/.rvm/gems/jruby-1.7.0/gems/carrierwave-0.6.2/lib/carrierwave/storage/fog.rb:250:in `store'
我在这里在 stackoverflow 上发现了一个类似的问题:JRuby Heroku Gem,但建议的答案是在 1.8 模式下运行 jruby,因为我们的整个应用程序使用 1.9 功能和语法,所以我不能这样做。是否有人对如何修复或解决此异常有任何想法或建议?
谢谢。