Forum: Ruby on Rails undefined method `to_query'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C01f0b3db2e2548c7fd7de4052302925?d=identicon&s=25 Ian (Guest)
on 2008-11-18 16:33
(Received via mailing list)
I'm trying to use a gem to access an API but I'm getting the message
=>  undefined method `to_query'

I go into the terminal and run...

>> p RAILS_GEM_VERSION
"1.2.3"
=> nil
>> Object.new.methods.include?('to_query')
=> false
>> exit

How do I add this method to my Rails installation?
134ea397777886d6f0aa992672a50eaa?d=identicon&s=25 Mark Thomas (Guest)
on 2008-11-18 16:49
(Received via mailing list)
> >> Object.new.methods.include?('to_query')
> => false
> >> exit

You won't see it from IRB, because Rails extends Object with the
methods. Try it from within 'script/console" -- it works for me in
Rails 2.0.2 (not sure about 1.2.3--that's fairly outdated).

-- Mark.
C01f0b3db2e2548c7fd7de4052302925?d=identicon&s=25 Ian (Guest)
on 2008-11-18 18:22
(Received via mailing list)
Yes.  Upgrading fixed it.  Thanks!
This topic is locked and can not be replied to.