Heroku template error - search for partitions in the wrong directory

So I'm learning Rails and working on a Michael Hartle tutorial.

When I deploy to Heroka, I get the infamous "We're sorry, but something went wrong."

The application works fine on the local development server.

Heroku magazines say:

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=>[:en], :formats=>[:html], :handlers=>[: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: </head>
2012-06-27T15:31:47+00:00 app[web.1]:     12: <body>
2012-06-27T15:31:47+00:00 app[web.1]:     13: 
2012-06-27T15:31:47+00:00 app[web.1]:     14: <%= render 'layouts/header' %>
2012-06-27T15:31:47+00:00 app[web.1]:     15: 
2012-06-27T15:31:47+00:00 app[web.1]:     16:     <div class="container">
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:       <% flash.each do |key, value| %>

If I read this correctly, he looks in /app/app/viewsfor a partial headline. This is not true - it must be in /app/views.

On my development machine, the file _header.html.erbis located at app/views/layouts.

So why did Heroku add an extra directory app?

+5
source share
2 answers

, : git commit -am "commit_message", git add. , .

git help commit:

-a, - -a ll

, , , git, .

, git push heroku master git push heroku master.

+3

, haml, Gemfile haml development.

Slim, , .

, , ( - env).

0

All Articles