{"action":"opened","issue":{"url":"https://api.github.com/repos/winston/google_visualr/issues/104","repository_url":"https://api.github.com/repos/winston/google_visualr","labels_url":"https://api.github.com/repos/winston/google_visualr/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/winston/google_visualr/issues/104/comments","events_url":"https://api.github.com/repos/winston/google_visualr/issues/104/events","html_url":"https://github.com/winston/google_visualr/issues/104","id":169443033,"number":104,"title":"Rails 5 \"undefined method 'helper_method' for ActionController::API::Class","user":{"login":"stephendolan","id":6677875,"avatar_url":"https://avatars.githubusercontent.com/u/6677875?v=3","gravatar_id":"","url":"https://api.github.com/users/stephendolan","html_url":"https://github.com/stephendolan","followers_url":"https://api.github.com/users/stephendolan/followers","following_url":"https://api.github.com/users/stephendolan/following{/other_user}","gists_url":"https://api.github.com/users/stephendolan/gists{/gist_id}","starred_url":"https://api.github.com/users/stephendolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephendolan/subscriptions","organizations_url":"https://api.github.com/users/stephendolan/orgs","repos_url":"https://api.github.com/users/stephendolan/repos","events_url":"https://api.github.com/users/stephendolan/events{/privacy}","received_events_url":"https://api.github.com/users/stephendolan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-04T18:33:13Z","updated_at":"2016-08-04T18:33:13Z","closed_at":null,"body":"Every time I run the `rspec` command in Rails 5.0 using RSpec-Rails 3.5, I get the following error:\r\n\r\n```\r\n/Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/google_visualr-2.5.1/lib/google_visualr/app/helpers/view_helper.rb:7:in `block in <module:ViewHelper>': undefined method `helper_method' for ActionController::API:Class (NoMethodError)\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/concern.rb:120:in `class_eval'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/concern.rb:120:in `append_features'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/google_visualr-2.5.1/lib/google_visualr/app/railtie.rb:11:in `include'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/google_visualr-2.5.1/lib/google_visualr/app/railtie.rb:11:in `block (2 levels) in <class:Railtie>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/api.rb:145:in `<class:API>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/api.rb:88:in `<module:ActionController>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/api.rb:5:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/jbuilder-2.6.0/lib/jbuilder/railtie.rb:20:in `block (2 levels) in <class:Railtie>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/base.rb:263:in `<class:Base>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/base.rb:164:in `<module:ActionController>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0/lib/action_controller/base.rb:5:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0/lib/action_view/test_case.rb:11:in `<class:TestCase>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0/lib/action_view/test_case.rb:10:in `<module:ActionView>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionview-5.0.0/lib/action_view/test_case.rb:8:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails/example/helper_example_group.rb:10:in `<module:HelperExampleGroup>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails/example/helper_example_group.rb:7:in `<module:Rails>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails/example/helper_example_group.rb:4:in `<module:RSpec>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails/example/helper_example_group.rb:3:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails/example.rb:4:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.1/lib/rspec/rails.rb:13:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'\r\n\tfrom /Users/stephen/Repos/xpm/spec/rails_helper.rb:7:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'\r\n\tfrom /Users/stephen/Repos/xpm/spec/models/user_spec.rb:1:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1435:in `load'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1433:in `each'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1433:in `load_spec_files'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:100:in `setup'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:86:in `run'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:71:in `run'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:45:in `invoke'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.2/exe/rspec:4:in `<top (required)>'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/bin/rspec:23:in `load'\r\n\tfrom /Users/stephen/.rbenv/versions/2.3.1/bin/rspec:23:in `<main>'\r\n```\r\n\r\nI was able to stop the error by adding an `if respond_to?(:helper_method)` wrapper around the `render_chart` method in the Visualr `app/helpers/view_helper.rb` file. Is this something I should make a pull request for, or something I need to fix with RSpec?\r\n\r\nThe error also occurs on the first pageload after restarting my Rails server."}}
{"actor":{"display_login":"stephendolan"}}