This project is archived and is in readonly mode.

#4800 ✓invalid
Darren Hinderer

MissingTemplate - html layout file is required

Reported by Darren Hinderer | June 8th, 2010 @ 08:34 PM

I don't have an application layout file and I have a handful of controllers that are rjs only. When my tests run I see errors like this:

ActionView::MissingTemplate: Missing layout layouts/application with {:handlers=>[:rhtml, :prawn_dsl, :prawn, :rxml, :erb, :builder, :prawn_xxx, :rjs], :formats=>[:js], :locale=>[:en, :en]} in view paths "/home/darren/drfunk/app/views", "/home/darren/drfunk/vendor/plugins/prawnto/app/views"

app/controllers/features_controller.rb:7:in `create'
/test/functional/features_controller_test.rb:18:in `test_create_ajax'

For this example, if I create an empty layout file called features.html.erb, or application.html.erb, the problem goes away. Although its confusing, it's not a difficult fix.

Why would a rjs action require an html layout? Is this a bug?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>