markbates / dj_remixes

Enhancements and improvements for Delayed Job 2.x
http://www.metabates.com
MIT License
42 stars 12 forks source link

'bundle console' fails #8

Closed jzinn closed 7 years ago

jzinn commented 13 years ago

I would like to use 'bundle console' to start an IRB session in the context of my current bundle, which includes dj_remixes. However, bundle console won't load due to uninitialized constant errors. I got it working with some if defined? Rails conditionals to the definitions of DJ::ActiveRecordRailtie and DJ::ActionMailerRailtie in their initializers, but I'm not sure that's the right way to do it.

$ bundle console
/.../vendor/ruby/1.9.1/gems/dj_remixes-0.3.0/lib/dj_remixes/active_record_railtie.rb:2:in `<module:DJ>': uninitialized constant DJ::Rails (NameError)

$ bundle console
/.../vendor/ruby/1.9.1/gems/dj_remixes-0.3.0/lib/dj_remixes/action_mailer/action_mailer_railtie.rb:2:in `<module:DJ>': uninitialized constant DJ::Rails (NameError)