Its driving me crazy!! I searched online for the answer and there are no
clear explanations for the NO METHOD ERROR.
in my new.html.erb file I have something like this:
<h1>EmpApp#new</h1>
<p>Find me in app/views/emp_app/new.html.erb</p>
<%= error_messages_for :employ %>
<% form_for(@employ) do |f| %>
<p>
<%= f.label :EmployDateFrom %><br />
<%= f.text_field :EmployDateFrom %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
and in my controller I have something like this:
def new
@employ = Employ.new
respond_to do |format|
format.html # new.html.erb
format.xml {render :xml => @employ }
end
end
and this is the kind of error I get no matter what I do. No matter what
I do do I get the same damn error I need TO KNOW WHY CAN ANYONE HELP ME
DOES ANYONE KNOW!!
NoMethodError in Emp_app#new
Showing app/views/emp_app/new.html.erb where line #6 raised:
undefined method `employs_path'' for #<ActionView::Base:0x520623c>
Extracted source (around line #6):
3:
4: <%= error_messages_for :employ %>
5:
6: <% form_for(@employ) do |f| %>
7:
8:
9: <p>
RAILS_ROOT: C:/Users/MaceWindu/Documents/Ruby/railsprojects/employeeApp
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`__send__''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`polymorphic_url''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in
`polymorphic_path''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in
`apply_form_for_options!''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in
`form_for''
app/views/emp_app/new.html.erb:6
app/controllers/emp_app_controller.rb:8:in `new''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`__send__''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`polymorphic_url''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in
`polymorphic_path''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in
`apply_form_for_options!''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in
`form_for''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in
`render_template''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in
`render_for_file''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in
`render_without_benchmark''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in
`realtime''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in
`custom''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in
`call''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in
`respond''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in
`respond''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in
`respond_to''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in
`perform_action_without_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in
`call_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in
`perform_action_without_caching''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in
`perform_action''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in
`cache''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in
`perform_action''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`process_without_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
`process_without_session_management_support''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
`handle_request''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
`dispatch_unlocked''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`synchronize''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
`dispatch_cgi''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in
`synchronize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in
`process_client''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`process_client''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`initialize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`new''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`initialize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`new''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load_without_new_constant_marking''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load''
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
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.2.2/lib/active_support/dependencies.rb:153:in
`require''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require''
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
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
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`__send__''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
`polymorphic_url''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in
`polymorphic_path''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in
`apply_form_for_options!''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in
`form_for''
app/views/emp_app/new.html.erb:6
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in
`render_template''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in
`render_for_file''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in
`render_without_benchmark''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in
`realtime''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in
`render''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in
`custom''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in
`call''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in
`respond''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in
`respond''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in
`respond_to''
app/controllers/emp_app_controller.rb:8:in `new''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in
`perform_action_without_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in
`call_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in
`perform_action_without_caching''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in
`perform_action''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in
`cache''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in
`perform_action''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`process_without_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
`process_without_session_management_support''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
`handle_request''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
`dispatch_unlocked''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`synchronize''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
`dispatch_cgi''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in
`synchronize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in
`process_client''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`process_client''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`initialize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`new''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`initialize''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`new''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in
`run''
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load_without_new_constant_marking''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in
`load''
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
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.2.2/lib/active_support/dependencies.rb:153:in
`require''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require''
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
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
Request
Parameters:
None
Show session dump
---
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers:
{"cookie"=>[],
"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Just a quick thought -- try :employ, instead of @employ in the form_for statement. On Apr 7, 2009, at 3:56 PM, Mace Windu wrote:> > Its driving me crazy!! I searched online for the answer and there > are no > clear explanations for the NO METHOD ERROR. > > > in my new.html.erb file I have something like this: > > <h1>EmpApp#new</h1> > <p>Find me in app/views/emp_app/new.html.erb</p> > > <%= error_messages_for :employ %> > > <% form_for(@employ) do |f| %> > > > <p> > <%= f.label :EmployDateFrom %><br /> > <%= f.text_field :EmployDateFrom %> > </p> > > > > <p> > <%= f.submit "Create" %> > </p> > <% end %> > > and in my controller I have something like this: > > def new > @employ = Employ.new > > respond_to do |format| > format.html # new.html.erb > format.xml {render :xml => @employ } > end > end > > and this is the kind of error I get no matter what I do. No matter > what > I do do I get the same damn error I need TO KNOW WHY CAN ANYONE HELP > ME > DOES ANYONE KNOW!! > > > NoMethodError in Emp_app#new > > Showing app/views/emp_app/new.html.erb where line #6 raised: > > undefined method `employs_path'' for #<ActionView::Base:0x520623c> > > Extracted source (around line #6): > > 3: > 4: <%= error_messages_for :employ %> > 5: > 6: <% form_for(@employ) do |f| %> > 7: > 8: > 9: <p> > > RAILS_ROOT: C:/Users/MaceWindu/Documents/Ruby/railsprojects/ > employeeApp > Application Trace | Framework Trace | Full Trace > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:248:in > `form_for'' > app/views/emp_app/new.html.erb:6 > app/controllers/emp_app_controller.rb:8:in `new'' > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:248:in > `form_for'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > renderable.rb:39:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > renderable.rb:39:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > template.rb:73:in > `render_template'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > base.rb:256:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1174:in > `render_for_file'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:905:in > `render_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/core_ext/benchmark.rb:8:in > `realtime'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:135:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:135:in > `custom'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:164:in > `call'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:164:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:158:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:107:in > `respond_to'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1253:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1253:in > `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:617:in > `call_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:610:in > `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/rescue.rb:136:in > `perform_action_without_caching'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/caching/sql_cache.rb:13:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > connection_adapters/abstract/query_cache.rb:34:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > query_cache.rb:8:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/caching/sql_cache.rb:12:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:524:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:524:in > `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:606:in > `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/session_management.rb:134:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:392:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:183:in > `handle_request'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:110:in > `dispatch_unlocked'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:123:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:122:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:122:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:132:in > `dispatch_cgi'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:39:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:76:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:74:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:74:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:159:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:158:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:282:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:281:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:281:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ > mongrel_rails:128:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/command.rb:212:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ > mongrel_rails:281 > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load_without_new_constant_marking'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/ > mongrel.rb:64 > 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.2.2/lib/ > active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 > 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 > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/form_helper.rb:248:in > `form_for'' > app/views/emp_app/new.html.erb:6 > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > renderable.rb:39:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > renderable.rb:39:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > template.rb:73:in > `render_template'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > base.rb:256:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1174:in > `render_for_file'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:905:in > `render_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/core_ext/benchmark.rb:8:in > `realtime'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:135:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:135:in > `custom'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:164:in > `call'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:164:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:158:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/mime_responds.rb:107:in > `respond_to'' > app/controllers/emp_app_controller.rb:8:in `new'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1253:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:1253:in > `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:617:in > `call_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:610:in > `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/rescue.rb:136:in > `perform_action_without_caching'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/caching/sql_cache.rb:13:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > connection_adapters/abstract/query_cache.rb:34:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > query_cache.rb:8:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/caching/sql_cache.rb:12:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:524:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:524:in > `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/filters.rb:606:in > `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/session_management.rb:134:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/base.rb:392:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:183:in > `handle_request'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:110:in > `dispatch_unlocked'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:123:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:122:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:122:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:132:in > `dispatch_cgi'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/dispatcher.rb:39:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:76:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:74:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/rails.rb:74:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:159:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:158:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel.rb:268:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:282:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:281:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/configurator.rb:281:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ > mongrel_rails:128:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/ > mongrel/command.rb:212:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/ > mongrel_rails:281 > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load_without_new_constant_marking'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/ > mongrel.rb:64 > 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.2.2/lib/ > active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ > active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 > 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 > > Request > > Parameters: > > None > > Show session dump > > --- > flash: !map:ActionController::Flash::FlashHash {} > > > Response > > Headers: > > {"cookie"=>[], > "Content-Type"=>"text/html", > "Cache-Control"=>"no-cache"} > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
do you have "map.resources :employs " in your routes.rb file? If so, is it namespaced? can you run "rake/routes" and copy/paste it''s contents here? On Apr 7, 8:56 pm, Mace Windu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Its driving me crazy!! I searched online for the answer and there are no > clear explanations for the NO METHOD ERROR. > > in my new.html.erb file I have something like this: > > <h1>EmpApp#new</h1> > <p>Find me in app/views/emp_app/new.html.erb</p> > > <%= error_messages_for :employ %> > > <% form_for(@employ) do |f| %> > > <p> > <%= f.label :EmployDateFrom %><br /> > <%= f.text_field :EmployDateFrom %> > </p> > > <p> > <%= f.submit "Create" %> > </p> > <% end %> > > and in my controller I have something like this: > > def new > @employ = Employ.new > > respond_to do |format| > format.html # new.html.erb > format.xml {render :xml => @employ } > end > end > > and this is the kind of error I get no matter what I do. No matter what > I do do I get the same damn error I need TO KNOW WHY CAN ANYONE HELP ME > DOES ANYONE KNOW!! > > NoMethodError in Emp_app#new > > Showing app/views/emp_app/new.html.erb where line #6 raised: > > undefined method `employs_path'' for #<ActionView::Base:0x520623c> > > Extracted source (around line #6): > > 3: > 4: <%= error_messages_for :employ %> > 5: > 6: <% form_for(@employ) do |f| %> > 7: > 8: > 9: <p> > > RAILS_ROOT: C:/Users/MaceWindu/Documents/Ruby/railsprojects/employeeApp > Application Trace | Framework Trace | Full Trace > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in > `form_for'' > app/views/emp_app/new.html.erb:6 > app/controllers/emp_app_controller.rb:8:in `new'' > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in > `form_for'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in > `render_template'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in > `render_for_file'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in > `render_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in > `realtime'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in > `custom'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in > `call'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in > `respond_to'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in > `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in > `call_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in > `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in > `perform_action_without_caching'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in > `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in > `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in > `handle_request'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in > `dispatch_unlocked'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in > `dispatch_cgi'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281 > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load_without_new_constant_marking'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64 > 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.2.2/lib/active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 > 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 > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in > `polymorphic_url'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:119:in > `polymorphic_path'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:269:in > `apply_form_for_options!'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in > `form_for'' > app/views/emp_app/new.html.erb:6 > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in > `render_template'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in > `render_for_file'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in > `render_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in > `realtime'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in > `render'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in > `custom'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in > `call'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in > `respond'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in > `respond_to'' > app/controllers/emp_app_controller.rb:8:in `new'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in > `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in > `call_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in > `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in > `perform_action_without_caching'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in > `cache'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in > `process_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in > `process_without_session_management_support'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in > `handle_request'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in > `dispatch_unlocked'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in > `dispatch_cgi'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in > `synchronize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in > `process_client'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `initialize'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `new'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in > `each'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in > `run'' > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281 > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load_without_new_constant_marking'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > `load'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64 > 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.2.2/lib/active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > `new_constants_in'' > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in > `require'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 > 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 > > Request > > Parameters: > > None > > Show session dump > > --- > flash: !map:ActionController::Flash::FlashHash {} > > Response > > Headers: > > {"cookie"=>[], > "Content-Type"=>"text/html", > "Cache-Control"=>"no-cache"} > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jim Schiel wrote:> Just a quick thought -- try :employ, instead of @employ in the > form_for statement.This worked thank you. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/4/7 Mace Windu <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>> > Jim Schiel wrote: > > Just a quick thought -- try :employ, instead of @employ in the > > form_for statement. > > This worked thank you.Can someone explain why please? I have both form_for(@blah) and form_for :blah and both appear to work ok for me. Colin> > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Gavin wrote:> do you have "map.resources :employs " > > in your routes.rb file? > > If so, is it namespaced? > > can you run "rake/routes" and copy/paste it''s contents here? > > > > On Apr 7, 8:56�pm, Mace Windu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>This worked aswell thank you. I originally had map.resources :emp_app which is the name of my controller. but when I changed it to: map.resources :employs and changed my new.html.erb back to: <% form_for(@employs) do |f| %> it work fine just like the previous suggestion -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Colin Law wrote:> 2009/4/7 Mace Windu <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > >> >> Jim Schiel wrote: >> > Just a quick thought -- try :employ, instead of @employ in the >> > form_for statement. >> >> This worked thank you. > > > Can someone explain why please? I have both form_for(@blah) and > form_for > :blah and both appear to work ok for me. > Colingood question I don''t know. I''m new to rails -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The reason it worked is because form_for was trying to resolve a RESTful route because it was passed a variable and not a constant. By either changing the variable to a constant, or creating the map.resources entry to create the RESTful routes, the problem is solved. I hope that helps! Jim Schiel On Apr 7, 2009, at 4:25 PM, Mace Windu wrote:> > Colin Law wrote: >> 2009/4/7 Mace Windu <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >> >>> >>> Jim Schiel wrote: >>>> Just a quick thought -- try :employ, instead of @employ in the >>>> form_for statement. >>> >>> This worked thank you. >> >> >> Can someone explain why please? I have both form_for(@blah) and >> form_for >> :blah and both appear to work ok for me. >> Colin > > good question I don''t know. I''m new to rails > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---