开发者

Rails 3 Mechanize - SocketError: getaddrinfo: Host or name not known

I am using mechanize and i get this error. Can someone please help me.

I have set meta refresh to true.

Error log:

SocketError: getaddrinfo: Host or name not known
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in 'initiallize'
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in 'open'
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in 'block in connect'
    form C:/Ruby192/lib/ruby/1.9.1/timeout.rb:44:in 'timeout'
    form C:/Ruby192/lib/ruby/1.9.1/timeout.rb:87:in 'timeout'
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in 'connect'
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:637:in 'do_start'
    form C:/Ruby192/lib/ruby/1.9.1/net/http.rb:632:in 'start'
    form C:/Ruby192/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:527:in 'fetch_page'
    form C:/Ruby192/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:591:in 'fetch_page'
    form C:/Ruby192/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:464:in 'post_form'
    form C:/R开发者_StackOverflow中文版uby192/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:370:in 'submit'
    form C:/Ruby192/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/form.rb:141:in 'submit'

Updated - Error message on form submit http://i.stack.imgur.com/Cuo9u.png

Form http://i.stack.imgur.com/XlrIm.png


Create config/initializers/requires.rb with require 'resolv-replace' inside

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜