similar to: undefined method `'' for #<DRb::DRbUnknown:0x2501bd4>

Displaying 20 results from an estimated 1000 matches similar to: "undefined method `'' for #<DRb::DRbUnknown:0x2501bd4>"

2006 Jul 19
1
A couple of problems
Hi Ezra, Thanks for the great work on BackgrounDRb. I have come across a couple of problems. 1. I wanted to define a simple class in the worker file to wrap up and pass back some data to my controller. It seems that if I create the class either inside or outside of my worker class (in the same file) it gets wrapper by a DRb::DRbUknown object and therefore cannot be accessed from my controller.
2006 Jul 05
5
''m having trouble with BackgrounDrb
Hi. I thought that BackgrounDrb was the perfect solution for my long running report production tasks. But I can''t seem to get anything useful back out of it. I set up a simple test worker that just does class TestWorker < BackgrounDRb::Rails attr_reader :pupil def do_work(args) @progress=0 @pupil=Pupil.find(3) sleep rand*10 @progress=100 end when I try to
2006 Nov 20
2
Passing object into results - "can''t convert DRb::DRbUnknown into Hash - (TypeError)"
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
2007 Apr 05
4
backgrounddrb problem..
i''m having some problems getting a simple example going with backgrounDRB. after i set my worker to work i try to get back the result like this: w = MiddleMan.worker(key) w.items comes back as DRb::DRbUnknown (i have items as attr_reader in my worker and access it inside there with @items). the result is actually activerecord results in an array. when i change it so my worker puts
2006 Jul 07
4
Problems with ActiveRecord in workers
Hi *, are there some special settings except of "load_rails: true" to make ActiveRecord models accessible within my workers? I''ve just installed the latest version of this great plugin, but I keep getting undefined method [] for #<DRb::DRbUnknown:0x12345> (line 105 in backgroundrb.rb) when one of the arguments for the worker is an ActiveRecord object. I assume that
2006 Jul 19
1
Testing worker classes
Hi, Does it make sense to test a worker class by calling Middleman.new_worker? Or should I just be testing the functionality in the do_work method, with, say, a mock object. This seems like a really ugly DRY violation: you''d need to keep the code in the mock and the real worker in sync. That''s the philosophical half of my question. In fact, until someone tells me why I
2006 Jul 19
1
Passing objects to drb, does it keep the existing db connection?
I have a simple question. Let''s say I do this in one of my models: after_save drb_conn.some_method(self) end When that object gets over to the background process is it the exact same as?.... Model.find some_id #in the background process As far as my background process is concerned passing the object is not any different than passing the id and using the find method? Because
2006 Aug 07
4
Memory leak?
I am using BackgrounDRb to resize images after they are accepted into our system. However, it has become clear that this creates a memory leak. I''m not sure exactly where the leak exists, but I don''t think it''s in my own code as it is presently being used in production and has resized thousands of images without a leak occurring, thanks to calling GC.start
2006 Aug 08
2
"include DRbUndumped" error
Hi, I am getting my hands on trying the cool BackgrounDrb plugin. Following various discussions and suggestsion, I included "include DRbUndumped" in my ActiveRecord model. However, the following exception occurs after I tried this and hit the page that uses this model. Does anyone know why this is so? Is it possible that an object cannot be DRbUndumped (that would mean, we
2006 Jun 15
5
Cannot invoke ActiveRecord subclass accessors in DRb worker
Hi there, I''m trying to create a worker to do some asynchronous web client work and update the data model with its results. It seems, however, that every call I make to an ActiveRecord subclass causes the whole thing to block. At least I think it''s blocked. Right now I''m just using debug log output. Is there a decent way to debug/test workers I can try? Is there any
2007 Nov 11
5
undefined method `add''
We''ve been running into problems with ferret indexing lately. The problem is intermittent and some times it persists. Just got this after wiping the index and redeploying: NoMethodError (undefined method `add'' for Solution:Class): (druby://10.1.65.87:9009) /data/releases/20071111152414/vendor/rails/activerecord/lib/active_record/base.rb:1238:in `method_missing''
2007 Jan 15
6
Instantiating middleman and worker from inside a model?
In short: how (if possible) would i go about arranging it so that i can instantiate a middleman and set a worker going from within a method in one of my models? or is this a weird thing to be wanting to do? ( My specific situation: I have an ''Image'' model in my application. An actual image file associated with the model is being stored on amazons s3 system.
2006 Sep 05
2
question about passing array of AR objects to worker
got a wierd problem maybe someone can help with. whenever i try to pass an array or AR objects to my worker, i end up with a DRb object in the worker...here''s an example class SearchWorker < BackgrounDRb::Rails attr_reader :resources def do_work(resources) logger.info resources.inspect end end class SearchController < ApplicationController def start_search
2006 Jul 22
1
Problem with drbundumped?
I''m not sure if this is a problem or not, but it definitely henders the way one would use the passing of objects to the drb server. Isn''t the point of passing objects to the drb server to act like its passing to just another local method? When I pass an object to the drb server a lot of the useful methods are gone. Such as id() or class () or inspect(), etc. I spent a
2006 Nov 20
4
Production RAILS_ENV / DB Selection
Hey all, I''m having some issues moving a project that incorporates Backgroundrb onto a staging server... For some reason (surely of my own doing), my RailsBase workers are insisting on using trying to access my development DB instead of my "production" DB. When I try to load a model object from within a worker, I get the following: 20061120-21:54:28 (26296)
2006 Jun 04
3
Database access for workers
Hi, nice work on BackgrounDrb! I have a question, though: What would be the best way to enable database access for a worker, preferably through ActiveRecord models. Background: I''m trying to write a worker that periodically gets data from an external source, writes it to the database and is then displayed by Rails. Anybody done something like this? Thanks in advance! ciao,
2007 May 17
4
help with executing instruction every i-th run of loop
I am running a very long loop and would like to save intermediate results in case of a system or program crash. Here is the skeleton of what my code would be: for (i in 1:zillion) { results[[i]]<-do.something.function() if (logical.test(i)) {save(results, "results.tmp")} } logical.test would test to see if i/1000 has no remainder. What R function would test that?
2006 Jun 15
12
Multithreading and DB access in Rails
I just tried writing some controllers, etc. that would allow me to start and monitor background tasks running in new (Ruby) threads, with the idea that I''d eventually manage long-running indexing processes that way. I can kick off such threads OK (by using Thread.new in a routine called by a controller), but it seems like Rails gets huffy if those background tasks and the ordinary
2006 Jul 19
1
Catch 22 with after_save. Please help.
I have a pretty strange problem. Here is basically what I have to demonstrate my problem: class Event < ActiveRecord::Base def after_create AnotherClass.find_event(id) end end class AnotherClass < ActiveRecord::Base def self.find_event(event_id) e = Event.find event_id end end Here is the catch 22 and it''s quite annoying. Basically ActiveRecord puts to whole save
2010 Jun 30
0
drb problem? ringy-dingy won't answer...
The following code works fine as long as I don''t try to run it through the distributed server. It doesn''t get there... It runs fine out of delayed_job, runs fine if called directly. But if ''distrib'' is true (the default) it runs right up to the call to the server and right past it without getting to the server or raising any errors. Am using Ruby 1.8.6.26 ,