0

我正在尝试将 Ckeditor ( https://github.com/galetahub/ckeditor ) 集成到我的 Rails 3.0 应用程序中。文档声明为 Rails 3.0 及更低版本使用gem 的3.6.3版本。我成功安装了 gem 并运行了生成器:

rails generate ckeditor:install  

我收到以下错误:

fetching rails.js  
/home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87:in `timeout'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in `connect'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:626:in `start'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
    from /home/alexs/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/open-uri.rb:769:in `buffer_o

这个问题有什么变通方法/解决方案吗?

4

1 回答 1

0

找到以下解决方法

在 Ruby 安装中找到open-uri.rb 。

临时更改

http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER

http.verify_mode = OpenSSL::SSL::VERIFY_NONE

运行生成器,然后将其更改回来。

于 2012-10-01T08:49:07.420 回答