# Render :partial erroring with wrong extension

**URL:** <https://www.ruby-forum.com/t/render-partial-erroring-with-wrong-extension/174513>\
**Category:** Rails\
**Created:** [August 27, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/render-partial-erroring-with-wrong-extension/174513 "2009-08-27T22:56:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [August 27, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/render-partial-erroring-with-wrong-extension/174513/1 "2009-08-27T22:56:05Z")

</div>

I’m thinking that for some reason Rails isn’t seeing a content\_type so  
is falling back to .erb rather than using .html.erb, but I can’t  
figure out how this would happen or why it’s not able to find the  
correct file. I encountered this when changing this view from \<%=  
render @gigs %\>, which finds gigs/\_gig.html.erb just fine. I can post  
the contents of \_gig\_big.html.erb if necessary, but for the most part  
it’s just a copy of \_gig.html.erb (for now).

View:

 \<%= render :partial =\> 'gig\_big', :collection =\> @gigs %\>

Error:  
ActionView::TemplateError (Missing template gigs/\_gig\_big.erb in view  
path app/views) on line #9 of app/views/gigs/index.html.erb:  
6: \<% end %\>  
7:   
8:

  
9: \<%= render :partial =\> ‘gig\_big’, :collection =\> @gigs %\>  
10: 

  
11: \<% end %\>

Partial:  
…/app/views/gigs/\_gig\_big.html.erb exists

---

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [August 28, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/render-partial-erroring-with-wrong-extension/174513/2 "2009-08-28T22:37:25Z")

</div>

Of course it was the one thing I didn’t check and was not in the  
error: a leading space in the partial’s filename. A twitchy typo, and  
a proportional font didn’t help either.
