[Backgroundrb-devel] Unable to load Models which reference plugins?
james at howison.name
Wed Jan 23 13:56:37 EST 2008
On Jan 23, 2008, at 12:05 AM, hemant wrote:
> Hi James,
> On Jan 23, 2008 6:51 AM, James Howison <james at howison.name> wrote:
>> On Jan 22, 2008, at 6:51 PM, Yves-Eric Martin wrote:
>>> hemant wrote:
>>>> Looks like you are having a model called event and backgroundrb
>>>> has a
>>>> class called Event and hence when bdrb is trying to load event
>>>> of its own, its loading your model and its failing.
>>>> Sadly to overcome this, you will have to perhaps rename your model
>> I'm certainly able to change my Model names, since it's early in the
>> game for this application, but seems that there is a more general
>> issue with namespaces here. Presumably the same thing would happen
>> I had a file matching any of the requires in packet.rb (including
>> pimp ;)
>>> Could changing "Event" to "Packet::Event" help bdrb load the correct
>> Seems that the issue comes from the "require 'event'" line at bdrb's
>> packet.rb:10 file. That line is picking up my RAILS_ROOT/app/model/
>> event.rb file.
>> Changing that line to:
>> require './vendor/plugins/backgroundrb/framework/event.rb'
>> seems to work, at least bdrb is able to start.
> Get rid of your existing copy and sync with trunk. bdrb will no longer
> conflict with any of your model files.
Great, the new directory structure looks to have solved the problem.
More information about the Backgroundrb-devel