You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
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...
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.
The text was updated successfully, but these errors were encountered: