no _dump_data is defined for class Mysql2::Result

Hi there,

I’m Vignesh developer @ Rails application. I was now getting an issue while I’m migrating my existing application with rails ‘3.2.13’ into rails ‘4.1.beta1’ .

This was my issue while i m signing in into my application

no _dump_data is defined for class Mysql2::Result

So if anyone could have some idea about the issue. Please share your ideas and it may be helpful for fixing it. :slight_smile:

Thanks,

Vignesh.

you might do better with the Ruby on Rails: Core group…

Hey Rick,

I’m new to ROR thats y i’m facing many challenges…

The Mysql2::Result class is a thin wrapper over the underlying C interface - in particular, it can do things like on-demand streaming of rows from the database. It’s not Marshal-able because most of the state doesn’t live in Ruby code.

As noted in the issue on the Mysql2 gem (Marshal dump fails for Mysql2::Result · Issue #275 · brianmario/mysql2 · GitHub), the workaround is to convert the Mysql2::Result instance to a hash or an array (fetching all the desired rows) before caching it.

–Matt Jones

Hi Jones,

Its so kind of you. Thanks for your suggestion.