[Backgroundrb-devel] unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb

Chris Hall christopher.k.hall at gmail.com
Fri Sep 15 09:54:07 EDT 2006


i ran rake backgroundrb:setup and modified the default
config/backgroundrb.yml file as:

---
port: "22223"
timer_sleep: 60
load_rails: true
environment: production
host: localhost
database_yml: config/database.yml
acl:
  deny: all
  allow: localhost 127.0.0.1
  order: deny,allow

and my database.yml

production:
  adapter: mysql
  database: chip2_production
  username: xxxxx
  password: xxxxx
  socket: /var/lib/mysql/mysql.sock



i found that rake backgroundrb:start starts the server with the
default values so i attempted to run:

script/backgroundrb/start --config-file config/backgroundrb.yml

but i get the following error:

AM2005:/srv/www/railsapps/chip2-beta-demo_091506 #
script/backgroundrb/start --config-file config/backgroundrb.yml
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:194:in
`establish_connection': development database is not configured
(ActiveRecord::AdapterNotSpecified)
        from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:185:in
`establish_connection'
        from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:182:in
`initialize_database'
        from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:in
`process'
        from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in
`run'
        from ./script/backgroundrb/../../config/environment.rb:13
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
        from script/backgroundrb/start:68

if backgroundrb is to use the backgroundrb.ylm config file, why would
it be trying to use the development database settings?  it's as if
it's not even reading the config file.

Chris


More information about the Backgroundrb-devel mailing list