Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundler.require leads to uninitialized constant ActionController::Base #81

Open
gmassman opened this issue Aug 9, 2018 · 2 comments
Open

Comments

@gmassman
Copy link

gmassman commented Aug 9, 2018

I recently installed the gem gush in my rails 5.1.6 app. After running bundle exec gush I get the following stack trace.

garrett:pesto ~/workspace/web-api> bundle exec gush                                                                                                                                               <-  4:32PM
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'health_check'. (Bundler::GemRequireError)
Gem Load Error is: uninitialized constant ActionController::Base
Did you mean?  Base64
Backtrace for gem load error is:
/Users/garrett/github/health_check/lib/health_check/health_check_controller.rb:5:in `<module:HealthCheck>'
/Users/garrett/github/health_check/lib/health_check/health_check_controller.rb:4:in `<top (required)>'
/Users/garrett/github/health_check/lib/health_check.rb:88:in `require'
/Users/garrett/github/health_check/lib/health_check.rb:88:in `<top (required)>'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:81:in `require'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `each'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `block in require'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `each'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `require'
/Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler.rb:114:in `require'
/Users/garrett/github/gush/bin/gush:4:in `<top (required)>'
/Users/garrett/.rvm/gems/ruby-2.4.4/bin/gush:23:in `load'
/Users/garrett/.rvm/gems/ruby-2.4.4/bin/gush:23:in `<main>'
/Users/garrett/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `eval'
/Users/garrett/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `<main>'
Bundler Error Backtrace:
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `each'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:76:in `block in require'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `each'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler/runtime.rb:65:in `require'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/gems/bundler-1.16.2/lib/bundler.rb:114:in `require'
        from /Users/garrett/github/gush/bin/gush:4:in `<top (required)>'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/bin/gush:23:in `load'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/bin/gush:23:in `<main>'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `eval'
        from /Users/garrett/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `<main>'

It looks to me like ActionController isn't loaded at runtime, but including the action_controller or actionpack dependencies in the gemspec doesn't seem to help anything.

Anyone have an idea about what's going on here?

@shlima
Copy link

shlima commented May 7, 2020

@gmassman you can check an alternative

@ianheggie
Copy link
Collaborator

@gmassman - I added a note in README to add gem 'health_check' after the rails gems - I presume you did that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants