[Backgroundrb-devel] Rails Configuration in Workers

Scott Willson scott at butlerpress.com
Sun May 4 19:09:30 EDT 2008


I override some Rails' configuration options in my project, like:
     config.database_configuration_file = "#{RAILS_ROOT}/local/config/ 
database.yml"

But they aren't picked up in BackgroundRB because Rails ActiveRecord  
is just initialized directly in MasterWorker#load_rails_env:
       db_config_file = YAML.load(ERB.new(IO.read("#{RAILS_HOME}/ 
config/database.yml")).result)

Is this an intentional design decision, or just simplest approach  
tha's "good enough?" Personally, I'd prefer that my Rails' environment  
was initialized the same way in my client application, BackgroundRB  
server and the workers—and I'm happy to contribute a patch to do it.  
If it makes sense. Is this a dead end that's been discussed before, or  
has just no one needed it before?

Thanks for any info.

Scott



More information about the Backgroundrb-devel mailing list