Controoler/View problem

Hi i’m new with ruby on rails. And i’m trying to build an application
with an authentication method, I’m using the Recipe from the book
“Rails Recipes”. The thing is that i wrote the procedure inside the
Login controller class, but when i try to access it I got an exception
that say “couldn’t find Login With ID=signin” (signin is the method
name) and it then show an error, here is the trace:

d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:1267:in find_one' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1250:infind_from_ids’
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:504:in find' app/controllers/logins_controller.rb:32:inshow’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:1158:in send' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:1158:inperform_action_without_filters’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:697:in call_filters' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ filters.rb:689:inperform_action_without_benchmark’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in perform_action_without_rescue' d:/ruby/lib/ruby/1.8/benchmark.rb:293:inmeasure’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in perform_action_without_rescue' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ rescue.rb:199:inperform_action_without_caching’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:678:in perform_action' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/query_cache.rb:33:incache’
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in cache' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ caching.rb:677:inperform_action’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in send' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:524:inprocess_without_filters’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:685:in process_without_session_management_support' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ session_management.rb:123:inprocess’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:388:in process' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:171:inhandle_request’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:115:in dispatch' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:126:indispatch_cgi’
d:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:9:in dispatch' d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 112:inhandle_dispatch’
d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in
service' d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
d:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' d:/ruby/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
d:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' d:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
d:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' d:/ruby/lib/ruby/1.8/webrick/server.rb:92:ineach’
d:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' d:/ruby/lib/ruby/1.8/webrick/server.rb:23:instart’
d:/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:indispatch’
d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:342:innew_constants_in’
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

One thing that i don’t understant is why is running the show method if
the url that i put was “http://127.0.0.1:3000/logins/signin

Another problem with this it that when I use before_filter
“check_authentication, :except => :signin”, I have try to put this
line in the ApplicationController and in LoginsControllers, or in
both, but the results are the same.

Any help will be appreciate it.

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