[Backgroundrb-devel] Passing object into results - "can't convert DRb::DRbUnknown into Hash - (TypeError)"

skaar skaar at waste.org
Mon Nov 20 17:42:22 EST 2006


* 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
----------------------------------------------------------------------


More information about the Backgroundrb-devel mailing list