Getting ActionController::InvalidAuthenticityToken error Please help tried to run thru the solution

Hi ,

I am trying to test spot.us on my local machine , I installed it and
have rails 2.3.2 but when i register a new user i get the following
error ActionController::InvalidAuthenticityToken.

I am pasting the traces please help , I am pretty new to ror so may
sound awkward sometimes

C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/request_forgery_protection.rb:79:in
verify_authenticity_token' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/callbacks.rb:178:insend’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/callbacks.rb:178:in evaluate_method' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/callbacks.rb:166:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:225:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/filters.rb:629:inrun_before_filters’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:615:in call_filters' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/filters.rb:610:inperform_action_without_benchmark’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/benchmarking.rb:68:in
perform_action_without_rescue' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/benchmark.rb:17:inms’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/benchmark.rb:10:in realtime' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/benchmark.rb:17:inms’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/benchmarking.rb:68:in
perform_action_without_rescue' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/rescue.rb:160:inperform_action_without_flash’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/flash.rb:141:in perform_action' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/base.rb:523:insend’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:523:in process_without_filters' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/filters.rb:606:insass_old_process’
C:/InstantRails/rails_apps/spot-us2/vendor/gems/haml-2.0.7/lib/sass/
plugin/rails.rb:19:in process' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/base.rb:391:inprocess’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:386:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/routing/route_set.rb:433:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:88:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/dispatcher.rb:111:in_call’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:82:in initialize' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/query_cache.rb:29:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/
active_record/query_cache.rb:29:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/connection_adapters/abstract/query_cache.rb:34:incache’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/
active_record/query_cache.rb:9:in cache' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/query_cache.rb:28:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/
active_record/connection_adapters/abstract/connection_pool.rb:361:in
call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ head.rb:9:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
methodoverride.rb:24:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/params_parser.rb:15:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/rewindable_input.rb:25:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/session/cookie_store.rb:93:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/reloader.rb:9:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/failsafe.rb:11:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
lock.rb:11:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ lock.rb:11:insynchronize’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
lock.rb:11:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ action_controller/dispatcher.rb:106:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/
static.rb:31:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ urlmap.rb:46:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
urlmap.rb:40:in each' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ urlmap.rb:40:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/
log_tailer.rb:17:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ content_length.rb:13:incall’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
chunked.rb:15:in call' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/ handler/mongrel.rb:61:inprocess’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-
mswin32-60/lib/mongrel.rb:159:in process_client' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86- mswin32-60/lib/mongrel.rb:158:ineach’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-
mswin32-60/lib/mongrel.rb:158:in process_client' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86- mswin32-60/lib/mongrel.rb:285:inrun’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-
mswin32-60/lib/mongrel.rb:285:in initialize' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86- mswin32-60/lib/mongrel.rb:285:innew’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-
mswin32-60/lib/mongrel.rb:285:in run' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86- mswin32-60/lib/mongrel.rb:268:ininitialize’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-
mswin32-60/lib/mongrel.rb:268:in new' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86- mswin32-60/lib/mongrel.rb:268:inrun’
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/
handler/mongrel.rb:34:in run' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/ server.rb:111 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:ingem_original_require’
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require’
script/server:3

Request

Parameters:

{“user”=>{“password_confirmation”=>“s”,
“type”=>“Citizen”,
“terms_of_service”=>“1”,
“first_name”=>“saurabh1”,
“last_name”=>“s”,
“password”=>“s”,
“email”=>“[email protected]”},
“x”=>“56”,
“y”=>“15”,
“authenticity_token”=>“LwLcbcAm56CqsVprhVAcL6AOrBJMsRcD+Hp6Q9WiVaA=”}

Thanks
Saurabh

It’s possible that you have a session key left over from a previous
app. Try clearing your session cookies and see if that helps.

Cheers,
Nicholas

Getting the same error when creating new user…

ActionController::InvalidAuthenticityToken in UsersController#create

ActionController::InvalidAuthenticityToken
RAILS_ROOT: /home/admin/spot-us

Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/request_forgery_protection.rb:79:in
verify_authenticity_token' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/callbacks.rb:178:insend’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/callbacks.rb:178:in
evaluate_method' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/callbacks.rb:166:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:225:in
call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:629:inrun_before_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:615:in
call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:610:inperform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:inms’
/usr/lib/ruby/1.8/benchmark.rb:308:in realtime' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/benchmark.rb:17:inms’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rescue.rb:160:inperform_action_without_flash’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/flash.rb:141:in
perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:523:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:523:in
process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:606:insass_old_process’
/home/admin/spot-us/vendor/gems/haml-2.0.7/lib/sass/plugin/rails.rb:19:in
process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:391:inprocess’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:386:in
call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/route_set.rb:433:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:88:in
dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:111:in_call’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in
initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:incall’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:in
call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:incache’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:9:in
cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:28:incall’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:incall’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:25:in
call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:93:incall’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reloader.rb:9:in
call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:incall’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:incall’
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:incall’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in each' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:incall’
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/log_tailer.rb:17:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:incall’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:inprocess’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in
process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:ineach’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in
process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in
initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:innew’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:ininitialize’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:inrun’
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in
run' /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
script/server:3
Request

Parameters:

{“x”=>“29”,
“y”=>“21”,
“authenticity_token”=>“vgJbe0UJTbEEYCC3oZl6YlOArxE2Uc56o98qqgZOxYs=”,
“user”=>{“password_confirmation”=>“pass”,
“type”=>“Citizen”,
“last_name”=>“yat”,
“terms_of_service”=>“1”,
“password”=>“pass”,
“first_name”=>“lav”,
“email”=>“[email protected]”}}
Show session dump

Response

Headers:

{“Content-Type”=>"",
“Cache-Control”=>“no-cache”}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs