Forum: Ruby on Rails Error: [Object]Controller: missing default helper path [cont

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A9a2faf6a73b4924b73532308cf34a8b?d=identicon&s=25 Chris Shorrock (Guest)
on 2005-12-15 21:23
(Received via mailing list)
Hello,

I seem to have run into a problem that I can't seem to make any
headway on. I've searched the mailing archives, google'd for the
appropriate keywords and have checked up with the folks on IRC but I
can't seem to find a solution.

My problem is as such. I have a web application that has various
controllers which work fine. I've added a new controller for the
object Event, which at this point is very simple and reads as:

class EventController < ApplicationController
   layout  'standard'

   before_filter :authorize

   # method handle used for handling adding new events to the system
   def add
     @locations = Location.find_roots
     @arts = Art.find_all
     @event = Event.new( @params[:event] )
     @event.user  = @session[:user]

     if @request.post? and @event.save
       redirect_to :action=>:view, :id=>@event.id
     else
       @event.errors.each_full do |msg|
         logger.error( "error while saving event: #{msg}")
       end
     end
   end

end

When I call http://localhost:3000/event/add/ it loads the correct
view which has a variety of form elements. When I commit this form I
get a blank page, and the output of WEBrick reads:

127.0.0.1 - - [15/Dec/2005:11:57:06 PST] "POST /event/add HTTP/1.1"
500 0
http://localhost:3000/event/add/ -> /event/add

The ONLY line which gets appended to the development.log is:

EventController: missing default helper path event_helper

Does anybody have any ideas what is going on? I've restarted the
server numerous times and have even (on a tip from the mailling list
archive) rebooted. Any help would be welcomed with much praise...

Chris
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2005-12-15 21:38
(Received via mailing list)
my first guess is you probably did not use 'script/generate controller
event' to create your controller, as that should have created the
app/helpers/event_helper.rb file as well

but i could be wrong.
A9a2faf6a73b4924b73532308cf34a8b?d=identicon&s=25 Chris Shorrock (Guest)
on 2005-12-15 21:50
(Received via mailing list)
Hmm... good guess - I didn't think it was required, since my other
controllers work without it, and my controller works, just not when I
post to the add method.. Anyhow - to be safe - I regenerated the
controller from scratch and re-ran it. The problem turns out to be
the same as before, only now while I still get a 500 response and a
blank page in my browser there is no messages whatsoever added to the
development.log...
This topic is locked and can not be replied to.