[Backgroundrb-devel] Setting up release-1.0.1
andre
andre at myavalaunch.com
Thu Jan 31 21:55:11 EST 2008
hemant wrote:
> On Tue, Jan 29, 2008 at 8:10 AM, andre <andre at myavalaunch.com> wrote:
>
>> hemant wrote:
>>
>> On Tue, Jan 29, 2008 at 5:43 AM, Andre Borrelly <andre at myavalaunch.com>
>> wrote:
>>
>>
>> Hello,
>>
>> I am unable to get the backgroundrb server to run.
>>
>> Initially I got:
>>
>>
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:263:in
>> `load_missing_constant': uninitialized constant BackgrounDRb::MasterProxy
>> (NameError)
>> from
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:in
>> `const_missing'
>> from ./script/backgroundrb:41
>>
>> Then after doing this:
>>
>> Index: script/backgroundrb
>> ===================================================================
>> --- script/backgroundrb (revision 313)
>> +++ script/backgroundrb (working copy)
>> @@ -6,8 +6,10 @@
>> WORKER_ROOT = rails_root + "/lib/workers"
>> SERVER_LOGGER = rails_root + "/log/backgroundrb_server.log"
>>
>> -["server","framework","lib"].each { |x| $LOAD_PATH.unshift(PACKET_APP +
>> "/#{x}")}
>> -$LOAD_PATH.unshift(WORKER_ROOT)
>> +#["server","framework","lib"].each { |x| $LOAD_PATH.unshift(PACKET_APP +
>> "/#{x}")}
>> +["server","framework","lib"].each { |x| $:.push(PACKET_APP + "/#{x}")}
>> +#$LOAD_PATH.unshift(WORKER_ROOT)
>> +$:.push(WORKER_ROOT)
>>
>> require RAILS_HOME + '/config/boot.rb'
>> require "active_record"
>>
>>
>> and adding in "environment.rb"
>>
>> config.load_paths +=
>> Dir["#{RAILS_ROOT}/vendor/plugins/backgroundrb/server"]
>> config.load_paths +=
>> Dir["#{RAILS_ROOT}/vendor/plugins/backgroundrb/framework"]
>>
>> I get this:
>>
>>
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:249:in
>> `load_missing_constant': Expected
>> RAILS_HOME/vendor/plugins/backgroundrb/server/master_worker.rb to define
>> MasterWorker (LoadError)
>> from
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:in
>> `const_missing'
>> from
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:465:in
>> `const_missing'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:96:in
>> `const_get'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:96:in
>> `load_workers'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:93:in
>> `each'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:93:in
>> `load_workers'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:19:in
>> `run'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/server/master_worker.rb:163:in
>> `initialize'
>> from ./script/backgroundrb:62:in `new'
>> from ./script/backgroundrb:62
>> RAILS_HOME/vendor/plugins/backgroundrb/lib/../framework/nbio.rb:23:in
>> `read_data': Packet::DisconnectError (Packet::DisconnectError)
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/worker.rb:47:in
>> `handle_internal_messages'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/core.rb:158:in
>> `start_reactor'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/core.rb:156:in
>> `each'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/core.rb:156:in
>> `start_reactor'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/core.rb:147:in
>> `loop'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/core.rb:147:in
>> `start_reactor'
>> from RAILS_HOME/vendor/plugins/backgroundrb/framework/worker.rb:21:in
>> `start_worker'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:134:in
>> `fork_and_load'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:115:in
>> `start_worker'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/server/master_worker.rb:165:in
>> `initialize'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/framework/packet_master.rb:18:in
>> `run'
>> from
>> RAILS_HOME/vendor/plugins/backgroundrb/server/master_worker.rb:163:in
>> `initialize'
>> from ./script/backgroundrb:62:in `new'
>> from ./script/backgroundrb:62
>>
>>
>> Did you actually delete your old, script/backgroundrb file and ran
>>
>> rake backgroundrb:setup
>>
>> Often you get start problems with new releases, because your plugin is
>> upgraded, but start/stop script is not.
>> Which OS you are on?
>>
>> Yes I have just followed those steps, but still no go.
>> I get:
>>
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:266:in
>> `load_missing_constant': uninitialized constant MasterWorker (NameError)
>>
>> If I add this in the environment.rb
>>
>> config.load_paths +=
>> Dir["#{RAILS_ROOT}/vendor/plugins/backgroundrb/server"]
>> config.load_paths +=
>> Dir["#{RAILS_ROOT}/vendor/plugins/backgroundrb/framework"]
>> I get
>>
>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:249:in
>> `load_missing_constant': Expected
>> RAILS_HOME/vendor/plugins/backgroundrb/server/master_worker.rb to define
>> MasterWorker (LoadError)
>>
>
> I am unable to reproduce this at my end. Can you try creating a fresh
> rails app and check out the plugin. Send me the tarball of your sample
> app, if all else fails.
>
For future reference I found the cause of this problem. Apparently I
generated a worker called Master which created a MasterWorker class.
This appears to be a namespace conflict with a backgroundrb system class.
I hope someone doesn't have to dig as far as I did to find this problem.
Hemant, is my evaluation correct?
Thank you for all the time you have spent working on this tool.
Let me know if I can be of any help on the persistence feature request.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080131/331ba4af/attachment.html
More information about the Backgroundrb-devel
mailing list