NoMethodError: undefined method `cookies' for main:Object #232

tarikjn opened this Issue Feb 8, 2011 · 1 comment


None yet

1 participant

tarikjn commented Feb 8, 2011


I am having the following issue that appear all of a sudden with no easy explanation. Authlogic version 2.1.6. Similar to issue reported by cojones at

u ={:email => '', :password => 'test123'})
=> #<UserSession: {:password=>"", :email=>""}>
NoMethodError: undefined method cookies' for main:Object from /Library/Ruby/Gems/1.8/gems/authlogic-2.1.6/lib/authlogic/controller_adapters/rails_adapter.rb:13:insend'
from /Library/Ruby/Gems/1.8/gems/authlogic-2.1.6/lib/authlogic/controller_adapters/rails_adapter.rb:13:in cookies' from /Library/Ruby/Gems/1.8/gems/authlogic-2.1.6/lib/authlogic/session/cookies.rb:117:insave_cookie'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:414:in _run_after_save_callbacks' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:insend'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:in run_callbacks' from /Library/Ruby/Gems/1.8/gems/authlogic-2.1.6/lib/authlogic/session/callbacks.rb:83:inafter_save'
from /Library/Ruby/Gems/1.8/gems/authlogic-2.1.6/lib/authlogic/session/existence.rb:71:in `save'
from (irb):10

tarikjn commented Feb 8, 2011

Actually it seems I was having a browser issue which got me testing in the console in the first place. Also, it seems to make sense that the controller doesn't have a cookie method from the console. Closing...

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment