当我运行rails g jquery:install时,我遇到了一个OpenSSL错误。
我的轨道控制台:
C:Railskonkurranceportalen>rails g jquery:install
remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.5)
identical public/javascripts/jquery.js
identical public/javascripts/jquery.min.js
fetching jQuery UJS adapter (github HEAD)
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:677:in `connect': SSL_connect returned=1 e
rrno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL
::SSL::SSLError)
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:677:in `connect'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:626:in `start'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:769:in `buffer_open'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:201:in `catch'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:671:in `open'
from C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:33:in `open'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/actions/fi
le_manipulation.rb:77:in `get'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/jquery-rails-0.2.7/lib/generato
rs/jquery/install/install_generator.rb:34:in `download_ujs_driver'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22
:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:118:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:124:in `block in invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:124:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:124:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:124:in `invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:2
26:in `dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:38
9:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/genera
tors.rb:163:in `invoke'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds/generate.rb:10:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:239:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:239:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:225:in `block in load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:596:in `new_constants_in'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:225:in `load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_
support/dependencies.rb:239:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
C:Railskonkurranceportalen>
这里有一个讨论类似问题的问题。汇编程序说明如下:
对于快速修复,请将以下行添加到"environment.rb":
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
一定要去掉那些线安装jquery rails 之后