nikhaldi / exception_notification-rake

Sends mail upon failures in Rake tasks
MIT License
40 stars 14 forks source link

Undefined method "application" for Rake:Module #18

Closed JakeTheSnake3p0 closed 7 years ago

JakeTheSnake3p0 commented 8 years ago

I just started receiving this error recently - most likely after my recent rails version update.

  Message from application: undefined method `application' for Rake:Module (NoMethodError)
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/exception_notification-rake-0.2.1/lib/exception_notifier/rake/rake_patch.rb:27:in `<top (required)>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/exception_notification-rake-0.2.1/lib/exception_notifier/rake.rb:2:in `<top (required)>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@www/gems/exception_notification-rake-0.2.1/lib/exception_notification/rake.rb:3:in `<top (required)>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:100:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:100:in `rescue in block in require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:77:in `block in require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
  /home/vagrant/apps/www-staging/config/application.rb:7:in `<top (required)>'
  /home/vagrant/apps/www-staging/config/environment.rb:2:in `require'
  /home/vagrant/apps/www-staging/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/passenger-5.0.28/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/passenger-5.0.28/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/passenger-5.0.28/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/passenger-5.0.28/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /home/vagrant/.rvm/gems/ruby-2.3.1@global/gems/passenger-5.0.28/src/helper-scripts/rack-preloader.rb:29:in `<main>'
nikhaldi commented 7 years ago

Sorry about the long wait. I think this is unrelated to the Rails version but probably had to do with your environment. E.g., I've gotten reports that under Rubymine this issue may occur. I just pushed a new release 0.3.0.rc1 which is compatible with Rails 4.2 and later and also fixes the Rubymine problem. Let me know if you still have problems with this.