maddox / tvdb_party

Simple Ruby library to talk to thetvdb.com
MIT License
72 stars 39 forks source link

TypeError: no marshal_dump is defined for class Proc #9

Open tkrajacic opened 12 years ago

tkrajacic commented 12 years ago

With both ruby 1.8.7 and 1.9.3-p194 I get the following error (after "results = tvdb.search('the west wing')") when trying the example in the README file.

Why is this happening? As far as I could google it, it has to do with a Proc that can't be serialized. Can this be fixed easily?

TypeError: no marshal_dump is defined for class Proc
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `dump'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `open'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:120:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:93:in `get_with_caching'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:101:in `get'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/search.rb:16:in `search'

Thanks, Thomas

tkrajacic commented 12 years ago

Ah, found the issue (It's in HTTParty) and this should fix it: https://github.com/jnunemaker/httparty/pull/152

iyshannon commented 12 years ago

Was that your issue? I had the same errors but it required a different fix. If that didn't fix it for you, I can submit my patch.

tkrajacic commented 12 years ago

Well, I fixed the error by adding this line before requiring tvdb_party:

gem 'httparty', '=0.8.2'
iyshannon commented 12 years ago

Ah okay, thanks! That's a lot easier than what I did.

On Fri, Aug 3, 2012 at 2:19 AM, Thomas < reply@reply.github.com

wrote:

Well, I fixed the error by adding this line before requiring tvdb_party:

gem 'httparty', '=0.8.2'

Reply to this email directly or view it on GitHub: https://github.com/maddox/tvdb_party/issues/9#issuecomment-7476588

pubis commented 11 years ago

Awesome @tkrajacic ! I had the same problem and downgraded HTTParty to 0.8.2 solved it right away. Thanks!