Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Marshal dump fails for Mysql2::Result #275

FND opened this Issue Jun 15, 2012 · 4 comments


None yet
5 participants

FND commented Jun 15, 2012

> client = Mysql2::Client.new(options)
> results = client.query("SELECT * FROM *")
> Marshal.dump(results)
TypeError: no _dump_data is defined for class Mysql2::Result

FreeNode#ruby suggested that it's rare for an object to not be marshallable - while I'm not sure whether fixing this is feasible at all, I figured it was worth ticketing.


brianmario commented Aug 22, 2012

Yeah I'm not sure how I would handle persisting the object into a marshallable object. I'm afraid I'll have to wait for someone to submit a pull request on this.

@brianmario brianmario closed this Aug 22, 2012

cubiic commented Jan 5, 2013

I'm facing the exact same issue , anyone has workaround for this error ?


sodabrew commented Jan 6, 2013

Pull the results out to an array or hash then Marshall that.

@metaskills metaskills referenced this issue in rails-sqlserver/tiny_tds Oct 14, 2013


Option to return DateTime instead of Time objects #83

no _dump_data is defined for class Mysql2::Result

Iam getting this error. Did anyone face this same issue , if so please send the rectification steps to solve this issue.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment