[Backgroundrb-devel] Unable to load Models which reference plugins?

hemant gethemant at gmail.com
Tue Jan 22 04:03:44 EST 2008


Hi,

On Jan 22, 2008 9:27 AM, James Howison <james at howison.name> wrote:
> I'm using a plugin which adds a method to ActiveRecord::Base
>
> http://similetimelinerailshelper.googlecode.com/svn/trunk/simile_timeline/
>
> This adds an "acts_as" type declaration to the Models, via the file in
> vendor/plugins/simile_timeline/lib/simile_timeline.rb Rails is working
> with these declarations, and they are being used successfully in
> 'regular Rails'.
>
> When I run script/backgroundrb start, I get an error saying that
> method is not found (error follows sig).  Backgroundrb is able to
> start up with those acts_as declarations commented out.
>
> Presumably I need to require the plugin file somewhere, but I wondered
> if backgroundrb might be meant to load the same things as Rails, by
> default.
>
> Thanks,
> James
>
> [james at MinistryOfInformation2]$script/backgroundrb start
> /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/
> base.rb:1532:in `method_missing': undefined method
> `acts_as_simile_timeline_event' for #<Class:0x11655fc> (NoMethodError)
>         from /Users/james/Documents/University/Syracuse/Research/Dissertation/
> fromSVN/Dissertation/genrebrowser/app/models/event.rb:9
>         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
>         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:496:in `require'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:342:in `new_constants_in'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:496:in `require'
>         from /Users/james/Documents/University/Syracuse/Research/Dissertation/
> fromSVN/Dissertation/genrebrowser/vendor/plugins/backgroundrb/
> framework/packet.rb:10
>         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
>         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:496:in `require'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:342:in `new_constants_in'
>         from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
> active_support/dependencies.rb:496:in `require'
>         from script/backgroundrb:16

Which version of BackgrounDRb you are running? Use either trunk or 1.0.1.
I remember version 1.0 has aggresive loading of models and hence you
will get errors, if your model requires other plugins.
But moving to 1.0.1 and trunk, I removed aggresive loading and model
environment is loaded same as rails loads them.

Tell me the version, I will have a look at issue.


-- 
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://gnufied.org


More information about the Backgroundrb-devel mailing list