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

Yves-Eric Martin yem_backgroundrb-devel at filter.yve.net
Tue Jan 22 21:20:17 EST 2008

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?


More information about the Backgroundrb-devel mailing list