{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/27359","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/27359/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/27359/comments","events_url":"https://api.github.com/repos/rails/rails/issues/27359/events","html_url":"https://github.com/rails/rails/issues/27359","id":195591230,"number":27359,"title":"ActiveRecord 5: `method_missing': undefined method `helper' for MyMailer","user":{"login":"jonhue","id":13420273,"avatar_url":"https://avatars.githubusercontent.com/u/13420273?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhue","html_url":"https://github.com/jonhue","followers_url":"https://api.github.com/users/jonhue/followers","following_url":"https://api.github.com/users/jonhue/following{/other_user}","gists_url":"https://api.github.com/users/jonhue/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhue/subscriptions","organizations_url":"https://api.github.com/users/jonhue/orgs","repos_url":"https://api.github.com/users/jonhue/repos","events_url":"https://api.github.com/users/jonhue/events{/privacy}","received_events_url":"https://api.github.com/users/jonhue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-14T17:15:21Z","updated_at":"2016-12-14T20:59:59Z","closed_at":null,"body":"### Issue\r\nThere is an issue with activerecord 5.0.0.1 that shuts down my app on startup in production.\r\nI deployed my app on Heroku and the following occurred ...\r\n\r\n#### Rails Console:\r\n\r\n`/app/vendor/bundle/ruby/2.2.0/gems/activerecord-5.0.0.1/lib/active_record/dynamic_matchers.rb:21:in `method_missing': undefined method `helper' for MyMailer (call 'MyMailer.connection' to establish a connection):Class (NoMethodError)`\r\n\r\n        from /app/app/models/my_mailer.rb:2:in `<class:MyMailer>'\r\n        from /app/app/models/my_mailer.rb:1:in `<top (required)>'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:380:in `block in require_or_load'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:37:in `block in load_interlock'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/concurrency/share_lock.rb:117:in `exclusive'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies/interlock.rb:11:in `loading'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:37:in `load_interlock'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:358:in `require_or_load'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:336:in `depend_on'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:252:in `require_dependency'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:475:in `each'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:475:in `block in eager_load!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:473:in `each'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:473:in `eager_load!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:354:in `eager_load!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:59:in `each'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:345:in `each'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:345:in `call'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'\r\n        from /app/vendor/ruby-2.2.6/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'\r\n        from /app/config/environment.rb:5:in `<top (required)>'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:157:in `require_application_and_environment!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:77:in `console'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'\r\n        from /app/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'\r\n        from /app/bin/rails:4:in `require'\r\n        from /app/bin/rails:4:in `<main>'`\r\n\r\nIn development everything runs fine.\r\n\r\n_I am fairly new to Rails so I don't know which factors are important for this issue. I am not sure if it is remotely caused or issued by my app._\r\n\r\n### System configuration\r\n**Rails version**: 5.0.0.1\r\n\r\n**Ruby version**: 2.2.0\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/267155006","html_url":"https://github.com/rails/rails/issues/27359#issuecomment-267155006","issue_url":"https://api.github.com/repos/rails/rails/issues/27359","id":267155006,"user":{"login":"maclover7","id":3020626,"avatar_url":"https://avatars.githubusercontent.com/u/3020626?v=3","gravatar_id":"","url":"https://api.github.com/users/maclover7","html_url":"https://github.com/maclover7","followers_url":"https://api.github.com/users/maclover7/followers","following_url":"https://api.github.com/users/maclover7/following{/other_user}","gists_url":"https://api.github.com/users/maclover7/gists{/gist_id}","starred_url":"https://api.github.com/users/maclover7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maclover7/subscriptions","organizations_url":"https://api.github.com/users/maclover7/orgs","repos_url":"https://api.github.com/users/maclover7/repos","events_url":"https://api.github.com/users/maclover7/events{/privacy}","received_events_url":"https://api.github.com/users/maclover7/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T20:59:59Z","updated_at":"2016-12-14T20:59:59Z","body":"Can you create an executable test script using one of the templates [here](https://github.com/rails/rails/tree/master/guides/bug_report_templates), that would demonstrate the problem you are seeing?"}}
{"actor":{"display_login":"maclover7"}}