[Backgroundrb-devel] rails environment loaded but one plugin is undefined (using backgroundrb 0.2.0)

Michael Hulet michael at mindtheshark.com
Mon Nov 27 09:53:27 EST 2006


Hello all,

I'm using BackgroundRb 0.2.0 (standalone) and in the do_work method of
my worker, I'm working with objects from my Rails application. So in my
config/backgroundrb.yml file, I added this line:

    :load_rails: true

I think my worker isn't doing what I want him to do. So I opened the
console and read these error lines:

    # ruby script/backgroundrb console
    irb: warn: can't alias jobs from irb_jobs.
    irb(#<BackgrounDRb::MiddleMan:0xb75b06dc>):001:0> Thumbnail
    => Thumbnail
    irb(#<BackgrounDRb::MiddleMan:0xb75b06dc>):002:0> Media
    NameError: undefined local variable or method `acts_as_taggable' for
    Media:Class
            from
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in
    `method_missing'
            from /home/web/ecox.com/ftp/dev/config/../app/models/media.rb:2
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
    `load'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
    `load'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
    `require_or_load'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in
    `depend_on'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
    `require_dependency'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in
    `const_missing'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
    `const_missing'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
    `send'
            from
    /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
    `const_missing'
            from (irb):2
    irb(#<BackgrounDRb::MiddleMan:0xb75b06dc>):003:0> exit

As you can see, I have "Thumbnail" and "Media" classes in my Rails
application. They are recognized, so Rails application seems to be
loaded. But my Media model uses the acts_as_taggable plugin... and so
the above error shown.

Do you know what I could do to load the plugin?

Have a nice week,

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: michael.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061127/60b87ab2/attachment.vcf 


More information about the Backgroundrb-devel mailing list