"Missing partial layouts/application" error on render :partial => "index", :layout => "application"

This is the second time I have seen this error, and been googling around
and
cant find an explanation. This error is happening with Rails 3/1.9.2 and
was
not with Rails 2.3.8/1.8.7:

Template is missing
Missing partial layouts/application with {:handlers=>[:erb, :rjs,
:builder,
:rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths
“/Users/DK/Documents/ror/projects/creditcompare3/app/views”

This is the controller code below, and yes, I have verified that the
layout
application.html.erb exists. What I don’t understand is why it seems
that
Rails is demanding that the layout be a partial. I did try changing the
application layout to a partial, and then in this case the page loads
without the above error. But on normal non-partial renders, then of
course I
loose the application template. Makes no sense to have both
application.html.erb and a partial _application.html.erb but this seems
to
be the only way I have found to hack around this error. Is there a new
syntax I should be using instead?

respond_to do |format|
  format.html { render :partial => "index", :layout => "application" 

}
end

Thanks much,

David

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