[Backgroundrb-devel] Unable to load Models which reference plugins?
james at howison.name
Tue Jan 22 21:45:29 EST 2008
On Jan 22, 2008, at 9:20 PM, Yves-Eric Martin wrote:
> James Howison wrote:
>> ps. Is there any smart automated way to change a Rails Model's
>> name, it is scattered all over the place, in files and filenames,
>> not to mention the database?
> Yes, it can be a real pain to rename a model. That is why the
> "rename your model" solution made me wince...
> As you pointed out, plugins should be very verbose with their
> namespace/paths in order to avoid conflicting with the main
> application. Now a small problem with
> require './vendor/plugins/backgroundrb/framework/event.rb'
> is that the path is hardcoded. It could be something else (I could
> have checked out the plugin code into ./vendor/plugins/BackgrounDRb).
> I went through some other plugins code to look for best practices,
> and it looks like a better way to do it would be:
> require File.dirname(__FILE__) + '/event'
> Can you check and see if that works?
Yes, that seems to work (bdrb starts ok), nice one. Does that take
care of potential namespace issues, though, maybe still need a unique
More information about the Backgroundrb-devel