Note that there are some explanatory texts on larger screens.

plurals
  1. POHeroku Template Error - looking for partials in the wrong directory
    primarykey
    data
    text
    <p>So I'm learning Rails and working through Michael Hartl's tutorial.</p> <p>When I deploy to Heroku, I get the infamous "We're sorry but something went wrong."</p> <p>The app runs just fine on the local development server.</p> <p>Heroku logs say:</p> <pre><code>2012-06-27T15:31:47+00:00 app[web.1]: Completed 500 Internal Server Error in 112ms 2012-06-27T15:31:47+00:00 app[web.1]: 2012-06-27T15:31:47+00:00 app[web.1]: * "/app/app/views" 2012-06-27T15:31:47+00:00 app[web.1]: ActionView::Template::Error (Missing partial layouts/header with {:locale=&gt;[:en], :formats=&gt;[:html], :handlers=&gt;[:erb, :builder]}. Searched in: 2012-06-27T15:31:47+00:00 app[web.1]: ): 2012-06-27T15:31:47+00:00 app[web.1]: 11: &lt;/head&gt; 2012-06-27T15:31:47+00:00 app[web.1]: 12: &lt;body&gt; 2012-06-27T15:31:47+00:00 app[web.1]: 13: 2012-06-27T15:31:47+00:00 app[web.1]: 14: &lt;%= render 'layouts/header' %&gt; 2012-06-27T15:31:47+00:00 app[web.1]: 15: 2012-06-27T15:31:47+00:00 app[web.1]: 16: &lt;div class="container"&gt; 2012-06-27T15:31:47+00:00 app[web.1]: app/views/layouts/application.html.erb:14:in `_app_views_layouts_application_html_erb__112987114114249875_31386580' 2012-06-27T15:31:47+00:00 app[web.1]: 17: &lt;% flash.each do |key, value| %&gt; </code></pre> <p>If I'm reading this correctly, it's looking in <code>/app/app/views</code> for the header partial. This is wrong - it should be in <code>/app/views</code>.</p> <p>On my development machine a file <code>_header.html.erb</code> is in <code>app/views/layouts</code>.</p> <p>So why did Heroku add the extra <code>app</code> directory?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload