hi i write the follwing code in sessions/new.html.erb file, when i go to run the application it gives the error <h1>Log In</h1> <% form_tag session_path do -%> <p><%= label_tag ''login'' %><br /> <%= text_field_tag ''login'', @login %></p> <p><%= label_tag ''password'' %><br/> <%= password_field_tag ''password'', nil %></p> <p><%= label_tag ''remember_me'', ''Remember me'' %> <%= check_box_tag ''remember_me'', ''1'', @remember_me %> </p> <p><%= submit_tag ''Log in'' %> <%= link_to ''Sign Up'', :signup %> <%= link_to ''Forgot Password?'', :forgot %> </p> <% end -%> can anyone tell wht''s with the above code, -- Posted via http://www.ruby-forum.com/.
2009/7/29 Rajendra Bayana <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > hi i write the follwing code in sessions/new.html.erb file, when i go to > run the application it gives the error > > <h1>Log In</h1> > > <% form_tag session_path do -%> > <p><%= label_tag ''login'' %><br /> > <%= text_field_tag ''login'', @login %></p> > > <p><%= label_tag ''password'' %><br/> > <%= password_field_tag ''password'', nil %></p> > > > <p><%= label_tag ''remember_me'', ''Remember me'' %> > > <%= check_box_tag ''remember_me'', ''1'', @remember_me %> > > </p> > > > <p><%= submit_tag ''Log in'' %> > <%= link_to ''Sign Up'', :signup %> > <%= link_to ''Forgot Password?'', :forgot %> > > </p> > <% end -%> >What is the error shown? Colin
Colin Law wrote:> 2009/7/29 Rajendra Bayana <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >> <p><%= label_tag ''password'' %><br/> >> <p><%= submit_tag ''Log in'' %> >> <%= link_to ''Sign Up'', :signup %> >> <%= link_to ''Forgot Password?'', :forgot %> >> >> </p> >> <% end -%> >> > > What is the error shown? > > ColinNoMethodError in Sessions#new Showing sessions/new.html.erb where line #19 raised: undefined method `symbol_path'' for #<ActionView::Base:0x32fb694> this is the error i got -- Posted via http://www.ruby-forum.com/.
Rajendra Bayana wrote:> Colin Law wrote: >> 2009/7/29 Rajendra Bayana <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >>> <p><%= label_tag ''password'' %><br/> >>> <p><%= submit_tag ''Log in'' %> >>> <%= link_to ''Sign Up'', :signup %> >>> <%= link_to ''Forgot Password?'', :forgot %> >>> >>> </p> >>> <% end -%> >>> >> >> What is the error shown? >> >> Colin > > NoMethodError in Sessions#new > Showing sessions/new.html.erb where line #19 raised: > > undefined method `symbol_path'' for #<ActionView::Base:0x32fb694> > > this is the error i gotin the server console the following error messages are shown c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `write'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `<<'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `_write_data'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:296:in `send_body_string'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:187:in `send_body'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:104:in `send_response'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:79:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.5/lib/webrick_server.rb:62:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.5/lib/commands/servers/webrick.rb:66 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:496:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:342:in `new_constants_in'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:496:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.5/lib/commands/server.rb:39 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' ./script/server:3 -e:2:in `load'' -e:2 127.0.0.1 - - [29/Jul/2009:15:26:31 India Standard Time] "GET /session/new HTTP/1.1" 500 0 http://127.0.0.1:3000/signup -> /session/new 127.0.0.1 - - [29/Jul/2009:15:26:31 India Standard Time] "GET /session/new HTTP/1.1" 500 15514 http://127.0.0.1:3000/signup -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:25 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:27 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:28 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:28 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:34 India Standard Time] "GET /session/new HTTP/1.0" 500 0 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:15:35 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new 127.0.0.1 - - [29/Jul/2009:16:19:01 India Standard Time] "GET /session/new HTTP/1.0" 500 15528 - -> /session/new -- Posted via http://www.ruby-forum.com/.
On Jul 29, 8:44 pm, Rajendra Bayana <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Colin Law wrote: > > 2009/7/29 Rajendra Bayana <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: > >> <p><%= label_tag ''password'' %><br/> > >> <p><%= submit_tag ''Log in'' %> > >> <%= link_to ''Sign Up'', :signup %> > >> <%= link_to ''Forgot Password?'', :forgot %> > > >> </p> > >> <% end -%> > > > What is the error shown? > > > Colin > > NoMethodError in Sessions#new > Showing sessions/new.html.erb where line #19 raised: > > undefined method `symbol_path'' for #<ActionView::Base:0x32fb694> > > this is the error i got > -- > Posted viahttp://www.ruby-forum.com/.The line <%= link_to ''Sign Up'', :signup %> is trying to make a path from the symbol :signup. Make sure you have routes set up correctly and change :signup to signup_path. Similarly with the next link.