Daniel Fischer
Daniel Fischer

Reputation: 3062

Weird render on heroku with rendering templates app/app/views

I'm having a weird issue.

Locally everything renders fine, and when I fire it up on Heroku I get this error:

2011-12-31T06:26:23+00:00 app[web.1]: ActionView::MissingTemplate (Missing template pages/index, application/index with {:handlers=>[:erb, :builder], :formats=>[:html], :locale=>[:en, :en]}. Searched in:
2011-12-31T06:26:23+00:00 app[web.1]:   * "/app/app/views"
2011-12-31T06:26:23+00:00 app[web.1]: ):

Why is it blows up with /app/app/views? Why would it have two apps in there? I'm not sure what's wrong. It's a pretty basic app. I haven't done anything fancy.

Upvotes: 8

Views: 1584

Answers (4)

cedarstarr
cedarstarr

Reputation: 339

I had this problem after refactoring with RubyMine. I changed the folder name in /views to use capital "Posts" on accident. Changing it to lowercase wasn't enough to fix the problem. I had to change one of the letters, push to heroku, rename the folder correctly, and then push it to heroku again.

Upvotes: 0

Diego M. Rodrigues
Diego M. Rodrigues

Reputation: 31

In my case the problem is the haml-rails insitde "group :assets do" in Gemfile

Moving gem "haml-rails" to outside of assets group, works fine.

Upvotes: 3

Vibhuti
Vibhuti

Reputation: 1634

In my case it was failing due to haml-rails gem being in :assets group. It was not able to render haml files.

Upvotes: 18

hecbuma
hecbuma

Reputation: 57

Be sure you add the haml-rails gem tu your gemfile

Upvotes: 3

Related Questions