similar to: "interning empty string - (ArgumentError)" passing AR objects between workers

Displaying 20 results from an estimated 900 matches similar to: ""interning empty string - (ArgumentError)" passing AR objects between workers"

2007 Aug 24
0
ArgumentError: interning empty string and enum-column plugin
Hello, I am a developer who has just started working on a large scale website in a team of 5 other developers. One of the developers has introduced some enum columns into the the database. Now, by default, active record doesn''t support enum column types but I have added the enum-column plugin into our project. This has worked very well except for a few instances where he
2009 Jun 01
0
ArgumentError (interning empty string)
Hello, I am trying to send an email out on registration for confirming and I am thrown this error. I am unable to understand as nothing is nil in the class which I am passing to the Mailer. Please do help me. The stack trace follows: ArgumentError (interning empty string): app/controllers/accounts_controller.rb:103:in `register'' app/controllers/accounts_controller.rb:43:in
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 Dec 06
0
Testing your workers
This has been asked before, never well attended perhaps. Any thoughts on testing your workers? Current implementation is broken. An empty test case like this: require File.dirname(__FILE__) + ''/../test_helper'' require "#{RAILS_ROOT}/lib/workers/market_summary_worker" require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib/backgroundrb.rb" require
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 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
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 ,
2006 Jul 25
1
can''t dump: session wierdness
Hi, I have "include DRbUndumped" in one of my model classes. Whenever my app accesses the session I get the following: can''t dump /usr/lib/ruby/1.8/drb/drb.rb:395:in `_dump'' /usr/lib/ruby/1.8/pstore.rb:349:in `dump'' /usr/lib/ruby/1.8/pstore.rb:327:in `transaction'' /usr/lib/ruby/1.8/cgi/session/pstore.rb:90:in `update''
2006 Feb 09
1
(no subject)
My application has one central database + Rails server and many distributed GUI clients. The remote clients need to read and update different collections of ActiveRecords. They also need to submit fairly demanding calculation + database update requests. Have you designed a similar Ruby application? What did you do? I''ll try to summarize the approachs I''m considering
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 Aug 26
0
DRbFire / ActiveRecord performances
Hi, I''m using drbfire to send a "DRbUndumped" ActiveRecord object from the server to the client, through an ADSL line of 4Mbits/s download, and 600Kbits/s upload. I was afraid there would be too many round-trips between the client and the server, and unfortunately this is true: Server code: ------------ #!/usr/local/bin/ruby require ''rubygems'' require
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,
2006 Apr 08
3
[Tip] Application Wide Context Howto
Friends- I see more and more folks wanting an application wide context object that will work regardless of server software(webrick,mongrel, fcgi''s, scgi''s) This can be a very useful technique if done correctly. Here is a little info that I have gleaned on a great way to do this type of thing. -----Easy AppServer---------------- An easy way to get yourself an
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 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 Aug 04
0
ArgumentError calling Dispatcher.dispatch
Hello. I am hitting a nasty error wherein the the 2nd sequential request to my rails application is failing with the following error. Note that I am getting this error with both webrick... #<ArgumentError: wrong number of arguments (3 for 1)> ["C:/sdks/ruby/1.8.4/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:115:in `dispatch''" ...and with Mongrel... Error
2006 Feb 04
0
ArgumentError when installing plugins with -x
This is the second time that I''ve tried to install plugins where this error has occured. It only occurs when I use the -x flag. script/plugin install -x svn://cartographer.rubyforge.org/trunk/vendor/plugins/cartographer /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/plugin.rb:675:in `method'': wrong number of arguments (0 for 1) (ArgumentError) from
2006 Feb 04
0
Cartographer plugin problem: was: ArgumentError when installing plugins with -x
On 2/3/06, jeremy*pinnix <jpinnix.alt@gmail.com> wrote: > This is the second time that I''ve tried to install plugins where this > error has occured. It only occurs when I use the -x flag. > > > What is the problem? > I found that the cartographer plugin has been moved to rubyforge. But I am still getting an error trying to install it. script/plugin install
2006 Feb 28
1
ArgumentError (string contains null byte) -- file upload problem
Hi, Controller code: if params[:main_image] image = Image.new image.blob = params[:main_image].read @product.main_image.destroy if @product.main_image @product.main_image = image end When I try to display the image using send_data, I get the following error: ArgumentError (string contains null byte):
2012 Feb 26
0
Getting ArgumentError calling initialize with ActiveResource 3.2.1
instantiate_record calls new, and new implicitly calls initialize (unless I''m not understanding the mystery) In base.rb def instantiate_record(record, prefix_options = {}) new(record, true).tap do |resource| resource.prefix_options = prefix_options end end As it''s written get an ArgumentError as this calls new(record, true). If I change the code in base.rb to the