pelargir / auto-session-timeout

Provides automatic session timeout in a Rails application.
MIT License
126 stars 63 forks source link

Gem Load Error is: undefined method `hide_action' for ActionController::Base:Class #7

Closed jmesserer closed 7 years ago

jmesserer commented 8 years ago

Was able to install it "successfully" but when I try to start my application it runs into issues.

jdms-mm:pdlog User$ ruby -v ruby 2.2.6p322 (2016-04-29 revision 54815) [x86_64-darwin15]

jdms-mm:pdlog User$ rails -v Rails 5.0.0.rc1

jdms-mm:pdlog User$ bundler -v Bundler version 1.12.4

jdms-mm:pdlog User$ gem install auto-session-timeout Successfully installed auto-session-timeout-0.9.2 Parsing documentation for auto-session-timeout-0.9.2 Done installing documentation for auto-session-timeout after 0 seconds 1 gem installed

jdms-mm:pdlog User$ rails c ... /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:89:in rescue in block (2 levels) in require': There was an error while trying to load the gem 'auto-session-timeout'. (Bundler::GemRequireError) Gem Load Error is: undefined methodhide_action' for ActionController::Base:Class Backtrace for gem load error is: /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/auto-session-timeout-0.9.2/lib/auto_session_timeout.rb:5:in included' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/auto-session-timeout-0.9.2/lib/auto_session_timeout.rb:40:ininclude' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/auto-session-timeout-0.9.2/lib/auto_session_timeout.rb:40:in <top (required)>' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:inrequire' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in block in require' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:259:inload_dependency' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in require' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/auto-session-timeout-0.9.2/lib/auto-session-timeout.rb:1:in<top (required)>' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:86:in require' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:86:inblock (2 levels) in require' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:81:in each' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:81:inblock in require' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:70:in each' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler/runtime.rb:70:inrequire' /Users/jdm/.rvm/gems/ruby-2.2-head@pdlog/gems/bundler-1.12.4/lib/bundler.rb:102:in `require' ...

pelargir commented 8 years ago

I haven't touched this gem in years. It's most likely incompatible with Rails 5. The last version of Rails I used it on was Rails 4.1

dowi commented 7 years ago

this could be the solution: https://github.com/hashrocket/decent_exposure/pull/121

rubendinho commented 7 years ago

I noticed there was a Rails 5.1 update recently with #12, but I'm still seeing the issue above. Is there an easy fix to the problem? Thanks.

pelargir commented 7 years ago

@rubendinho you shouldn't be getting that error any longer because the gem no longer tries to call #hide_action when loading. I just published a new version (0.9.4) to rubygems.org in case the last version didn't include this change for some reason. Please double check that your gem has actually been updated to the latest (bundle update or whatever) and try again.