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

undefined method prepare!' for class ActionDispatch::Session::AbstractStore' #17

Open
restebanez opened this issue Oct 10, 2011 · 7 comments
Assignees

Comments

@restebanez
Copy link

Hi there,

devise_cas_authenticatable seems not to work in rails 3.1.1 and ruby 1.9.2-p290. After bundle install, i run:

rails generate devise User, and i got this error:

/Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/core_ext/module/aliasing.rb:31:in alias_method': undefined methodprepare!' for class ActionDispatch::Session::AbstractStore' (NameError) from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/core_ext/module/aliasing.rb:31:inalias_method_chain'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/devise_cas_authenticatable-1.0.0.alpha12/lib/devise_cas_authenticatable/single_sign_out.rb:24:in block in <top (required)>' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/devise_cas_authenticatable-1.0.0.alpha12/lib/devise_cas_authenticatable/single_sign_out.rb:19:inclass_eval'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/devise_cas_authenticatable-1.0.0.alpha12/lib/devise_cas_authenticatable/single_sign_out.rb:19:in <top (required)>' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:inrequire'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in block in require' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:inblock in load_dependency'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in new_constants_in' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:inload_dependency'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in require' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/devise_cas_authenticatable-1.0.0.alpha12/lib/devise_cas_authenticatable.rb:8:in<top (required)>'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:inblock (2 levels) in require'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in each' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:inblock in require'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in each' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:inrequire'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/bundler-1.0.21/lib/bundler.rb:122:in require' from /Users/restebanez/agi/config/application.rb:13:in<top (required)>'
from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/railties-3.1.1/lib/rails/commands.rb:21:in require' from /Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/railties-3.1.1/lib/rails/commands.rb:21:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

Here is my bundle list:

Gems included by the bundle:

  • actionmailer (3.1.1)
  • actionpack (3.1.1)
  • activemodel (3.1.1)
  • activerecord (3.1.1)
  • activeresource (3.1.1)
  • activesupport (3.1.1)
  • arel (2.2.1)
  • bcrypt-ruby (3.0.1)
  • builder (3.0.0)
  • bundler (1.0.21)
  • coffee-rails (3.1.1)
  • coffee-script (2.2.0)
  • coffee-script-source (1.1.2)
  • devise (1.4.8)
  • devise_cas_authenticatable (1.0.0.alpha12)
  • erubis (2.7.0)
  • execjs (1.2.9)
  • hike (1.2.1)
  • i18n (0.6.0)
  • jquery-rails (1.0.14)
  • json (1.6.1)
  • mail (2.3.0)
  • mime-types (1.16)
  • multi_json (1.0.3)
  • orm_adapter (0.0.5)
  • polyglot (0.3.2)
  • rack (1.3.3)
  • rack-cache (1.1)
  • rack-mount (0.8.3)
  • rack-ssl (1.3.2)
  • rack-test (0.6.1)
  • rails (3.1.1)
  • railties (3.1.1)
  • rake (0.9.2)
  • rdoc (3.10)
  • rubycas-client (2.2.1)
  • sass (3.1.10)
  • sass-rails (3.1.4)
  • sprockets (2.0.2)
  • sqlite3 (1.3.4)
  • thor (0.14.6)
  • tilt (1.3.3)
  • treetop (1.4.10)
  • tzinfo (0.3.30)
  • uglifier (1.0.3)
  • warden (1.0.6)

Thanks,

Rodrigo

@nbudin
Copy link
Owner

nbudin commented Oct 10, 2011

Hi Rodrigo, thanks for the bug report! We're actually aware of the issue and there's a potential fix checked into master, but we're still testing to make sure we haven't broken single sign-out support.

If you like, please try changing to use the master branch from git in your Gemfile:

gem 'devise_cas_authenticatable', :git => 'git://github.com/nbudin/devise_cas_authenticatable.git'

If that doesn't work for you, please let me know!

@ghost
Copy link

ghost commented Oct 20, 2011

how's the fix coming along?

@restebanez
Copy link
Author

The bug went away using the git repository. Thanks a lot!

@nbudin
Copy link
Owner

nbudin commented Oct 20, 2011

At this point I'm satisfied that this fixes Rails 3.1. The only question is whether this change breaks single sign-out support, which jeremyhaile coded. I don't have a CAS server with single sign-out to test it with, so I'll either have to set one up or write a unit test to simulate one. If anyone has a SSO-enabled CAS server and would like to give it a try, that would probably speed the release.

@nbudin nbudin reopened this Oct 20, 2011
@ghost ghost assigned nbudin Oct 20, 2011
@restebanez
Copy link
Author

In a month or so i'll returned to the CAS authentication, after i saw that the bug went away, i had to change to a different project. I'll report to you as soon as CAS is configured and working

@jazzdan
Copy link

jazzdan commented Oct 27, 2011

Hi all,

When I followed nbudin's instructions to fix this issue I encountered this error upon executing bundler:

Using devise_cas_authenticatable (1.0.0.alpha12) from git://github.com/nbudin/devise_cas_authenticatable.git (at master) 
NoMethodError: undefined method `write' for #<Syck::Emitter:0x007f9fef20a558>
An error occured while installing devise_cas_authenticatable (1.0.0.alpha12), and Bundler cannot continue.
Make sure that `gem install devise_cas_authenticatable -v '1.0.0.alpha12'` succeeds before bundling.

The gem install command succeeds however:

gem install devise_cas_authenticatable -v '1.0.0.alpha12'
Successfully installed devise_cas_authenticatable-1.0.0.alpha12
1 gem installed
Installing ri documentation for devise_cas_authenticatable-1.0.0.alpha12...
Installing RDoc documentation for devise_cas_authenticatable-1.0.0.alpha12...

Is this related to the above issue?

EDIT: Turns out I just needed to update the bundler gem, d'oh!

gem install bundler

@dwaynemac
Copy link
Contributor

i switched to :git version and it was solved as well. but i don't have a SSO to help, sorry

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

4 participants