[Backgroundrb-devel] Passing object into results - "can't convert DRb::DRbUnknown into Hash - (TypeError)"
David Lee
davidjy.lee at gmail.com
Mon Nov 20 18:08:35 EST 2006
skaar,
Thank you. That works :)
On 11/20/06, skaar <skaar at waste.org> wrote:
>
> * David Lee (davidjy.lee at gmail.com) [061120 15:45]:
> > Hi,
> >
> > I'm using backgroundrb to get RSS feeds and pass them back to the
> > controller. I'm using the Ruby RSS library to parse the feed, which
> > returns an RSS object. After that I pass the object into the results
> hash,
> > but that's when this error occurs. Basically, this is what I have:
> >
> > rss = RSS::Parser.parse(response.body)
> > results[:feed] = rss # error!
> >
> > 20061120-15:46:19 (16250)
> > (drbunix:///tmp/backgroundrb.16249/backgroundrb_results_0)
>
> > /Users/guest/workspace/project_nano/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:101:in
> > `merge!'
> > 20061120-15:46:19 (16250)
> > (drbunix:///tmp/backgroundrb.16249/backgroundrb_results_0)
>
> > /Users/guest/workspace/project_nano/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:101:in
> > `set_result'
> >
> > Any ideas?
>
> it would seem like parse returns data that is not serializable over DRb
> from the perspective of the results worker.
>
> I need to think a little bit how to go about with this. I don't think we
> want the results worker to load all possible libraries that the workers
> are using. In this case, if we just add require 'rss' to the results
> worker it will work.
>
> Then if you run from the console, you would also have to add a require
> 'rss' to display the data properly.
>
> I've captured a simple case in:
> http://backgroundrb.devjavu.com/projects/backgroundrb/changeset/158
>
> /skaar
>
>
> --
> ----------------------------------------------------------------------
> |\|\ where in the | s_u_b_s_t_r_u_c_t_i_o_n
> | | >=========== W.A.S.T.E. | genarratologies
> |/|/ (_) is the wisdom | skaar at waste.org
> ----------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061120/8081cd5e/attachment-0001.html
More information about the Backgroundrb-devel
mailing list