# Render file in index

**URL:** <https://www.ruby-forum.com/t/render-file-in-index/142562>\
**Category:** Rails\
**Created:** [July 9, 2008, 8:40am UTC](https://www.ruby-forum.com/t/render-file-in-index/142562 "2008-07-09T08:40:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![torso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/34f0e0/32.png) [@torso](https://www.ruby-forum.com/u/torso)\
**Post date:** [July 9, 2008, 8:40am UTC](https://www.ruby-forum.com/t/render-file-in-index/142562/1 "2008-07-09T08:40:10Z")

</div>

Hi

I am trying to render file in controller like this :  
def index  
render :flie =\> ‘app\views\upload\uploadfile.html.erb’  
end

It still complains that template is missing.

Template is missing  
Missing template upload/index.html.erb in view path /home/rails/  
directory/app/views

Do i have to use funtion render :template or how i can change that  
default index.html.erb

---

<div class="post-metadata">

**Author:** ![torso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/34f0e0/32.png) [@torso](https://www.ruby-forum.com/u/torso)\
**Post date:** [July 9, 2008, 10:25am UTC](https://www.ruby-forum.com/t/render-file-in-index/142562/2 "2008-07-09T10:25:46Z")

</div>

u can use send\_data 🙂
