Rails.logger is undefined #27

Open
bsedat opened this Issue Feb 15, 2012 · 2 comments

2 participants

@bsedat

It would be great if the Rails.logger was set/configurable within workers when running rails code. Right now we've seen other gems (specifically the DelayedJob gem) error out due to Rails.logger being undefined:

/mnt/sw_jobs/u9189/user_dir/gems/delayed_job/lib/delayed/worker.rb:22:in `<class:Worker>': undefined method `logger' for Rails:Module (NoMethodError)
from /mnt/sw_jobs/u9189/user_dir/gems/delayed_job/lib/delayed/worker.rb:8:in `<module:Delayed>'
from /mnt/sw_jobs/u9189/user_dir/gems/delayed_job/lib/delayed/worker.rb:7:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /mnt/sw_jobs/u9189/user_dir/gems/delayed_job/lib/delayed_job.rb:8:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /mnt/sw_jobs/u9189/user_dir/runner.rb:63:in `<main>'
@treeder
Iron.io member

Hey @bsedat-tinfoil , were you able to work around this?

And we're about to start pushing people towards our new ng gem that doesn't do all the Rails magic: https://github.com/iron-io/iron_worker_ruby_ng

@bsedat

We've worked around it but it would be convenience :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment