Project1

标题: ror求教…… [打印本页]

作者: yangff    时间: 2011-4-9 19:18
标题: ror求教……
按照这样做
http://tech.j2bb.com/?p=441
然后就这样了%……
E:\ror>rails generate 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>'


作者: rmg_mage    时间: 2011-4-9 19:32
就算6r好多编程高手
羊爱你觉得在这里问这种问题是不是........
作者: DeathKing    时间: 2011-4-10 10:02
[南京]蜗牛同学  10:00:45
jquery需要装么。。
[南京]蜗牛同学 10:00:52
下载下来拷到javascripts里就行了


纯引用?从某Ruby on Rails群。
作者: 苏小脉    时间: 2011-4-10 12:04
应该是 OpenSSL 找不到证书认证中心的问题,SSL 认证需要根部证书。

试试这个解决方案:
http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/
作者: yangff    时间: 2011-4-10 12:27
苏小脉 发表于 2011-4-10 12:04
应该是 OpenSSL 找不到证书认证中心的问题,SSL 认证需要根部证书。

试试这个解决方案:

thx……怎么用
作者: 苏小脉    时间: 2011-4-10 13:42
yangff 发表于 2011-4-10 12:27
thx……怎么用

按照链接文章里的方法手动指定认证中心包文件应该就可以了。不过 Windows 下的 OpenSSL 很乱,这种环境问题是最恶心的,搞 Rails 最好就不要和 Windows 搀和了。

如果只是为了测试,不考虑安全,可以把认证关闭:

  1. https.verify_mode = OpenSSL::SSL::VERIFY_NONE
复制代码
https 是 Net::HTTP 实例。
作者: yangff    时间: 2011-4-10 13:49
苏小脉 发表于 2011-4-10 13:42
按照链接文章里的方法手动指定认证中心包文件应该就可以了。不过 Windows 下的 OpenSSL 很乱,这种环境问 ...

= = 我的意思是这句放哪里?
作者: 苏小脉    时间: 2011-4-10 14:43
yangff 发表于 2011-4-10 13:49
= = 我的意思是这句放哪里?

什么地方发送的请求放什么地方,这里是在用 generator,generator 调用的是 Thor,而 Thor 直接调用 open-uri 的open,所以直接进到 open-uri.rb 改。

这应该是一个在 Windows 下已知的问题,只是目前看来还没修复。




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1