ryandotsmith/queue_classic — pull request #24 by szetobo (2011-11-17 03:16:04+00:00)
Title: Setting DATABASE_URL in initializer not working as expected

I follow the documentation to setup DATABASE_URL in an initializer, but its value never picked up by QC::Database.new. While explicitly passing DATABASE_URL in command line works normally.

I try to fix it by delaying the evaluation of environment variables until QC::Database.new instead of when the module load. I test it in my Rails app (3.1.1 on ruby 1.9.3-p0) and seems working.