Closed pawelkomarnicki closed 11 years ago
Ruby 2.0 (2.0.0-p247) seems fine.
nov.matake@tovl ~$ pry
[1] pry(main)> RUBY_VERSION
=> "2.0.0"
[2] pry(main)> require 'open-uri'
=> true
[3] pry(main)> OpenURI::Meta.init(o = '')
=> nil
[4] pry(main)> o.methods.grep /meta/
=> [:meta, :meta_setup_encoding, :meta_add_field]
Rails 4.0 on Ruby 2.0 also seems fine.
nov.matake@tovl x$ r c
Loading development environment (Rails 4.0.0)
irb(main):001:0> OpenURI::Meta.init(o = '')
=> nil
irb(main):002:0> o.methods.grep /meta/
=> [:meta, :meta_setup_encoding, :meta_add_field]
I guess it's your environment specific issue.
any updates? or can I close this issue?
Hi, I've been testing fb_graph
with ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin12.4.0]
and get the same error.
Looks like meta_add_field has been replaced with meta_add_field2. What's more while meta_add_filed took a name and a value meta_add_field2 takes a name and an array of values
I have submitted a patch http://bugs.ruby-lang.org/issues/9051
@eamonn-webster Thanks for the clarification. Based on the patch, it should be possible to temporarily fix it on 2.1dev
with the following code (untested):
module OpenURI::Meta
def meta_add_field(name, value)
meta_add_field2(name, [value])
end
end
Also, I found an open PR about this in httpclient: https://github.com/nahi/httpclient/pull/180
That is what I did in my patch.
Hmm I was trying to run any example, but I keep getting this error all the time: