Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no _dump_data is defined for class Mutex (TypeError) #68

Closed
dogweather opened this issue Aug 20, 2013 · 2 comments
Closed

no _dump_data is defined for class Mutex (TypeError) #68

dogweather opened this issue Aug 20, 2013 · 2 comments

Comments

@dogweather
Copy link

I'm getting this error when using the Mechanize gem:

def get_page(n, agent)
puts "Getting page #{n}..."
return agent.get(url_for_page(n))
end

pages = Parallel.map(page_num_array) do |n|
get_page(n, agent)
end

This is on Mac OS X, using RVM, in both ruby 1.9.3 and 2.0.0.

@grosser
Copy link
Owner

grosser commented Aug 20, 2013

Try initializing the agent inside of the block, my guess would be that mutexes cannot be shared across process boundaries, otherwise a backtrace or reproduction steps or failing test would be helpful :)

@dogweather
Copy link
Author

Thanks for the suggestion. I worked around the problem by changing my method to return a string instead of the Mechanize::Page object. The error is thrown in the calls to Marshal, and so I followed a hunch and gave it something easier to serialize...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants