Errorr in sessions/new.html.erb

hi i write the follwing code in sessions/new.html.erb file, when i go to
run the application it gives the error

Log In

<% form_tag session_path do -%>

<%= label_tag 'login' %>
<%= text_field_tag 'login', @login %>

<%= label_tag 'password' %>
<%= password_field_tag 'password', nil %>

<%= label_tag 'remember_me', 'Remember me' %>

<%= check_box_tag ‘remember_me’, ‘1’, @remember_me %>

<%= submit_tag 'Log in' %> <%= link_to 'Sign Up', :signup %> <%= link_to 'Forgot Password?', :forgot %>

<% end -%>

can anyone tell wht’s with the above code,

2009/7/29 Rajendra B. [email protected]:

<%= label_tag 'password' %>

<%= submit_tag 'Log in' %> <%= link_to 'Sign Up', :signup %> <%= link_to 'Forgot Password?', :forgot %>

<% end -%>

What is the error shown?

Colin

Colin L. wrote:

2009/7/29 Rajendra B. [email protected]:

<%= label_tag 'password' %>

<%= submit_tag 'Log in' %> <%= link_to 'Sign Up', :signup %> <%= link_to 'Forgot Password?', :forgot %>

<% 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

Rajendra B. wrote:

Colin L. wrote:

2009/7/29 Rajendra B. [email protected]:

<%= label_tag 'password' %>

<%= submit_tag 'Log in' %> <%= link_to 'Sign Up', :signup %> <%= link_to 'Forgot Password?', :forgot %>

<% 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

in 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:insend_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:insend_response’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:79:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:ineach’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:instart’
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:indispatch’
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:inrequire’
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:innew_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:ingem_original_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' ./script/server:3 -e:2:inload’
-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

On Jul 29, 8:44 pm, Rajendra B. [email protected]
wrote:

What is the error shown?
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.

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