# render file in index

**URL:** <https://discuss.rubyonrails.org/t/render-file-in-index/31603>\
**Category:** rubyonrails-talk\
**Created:** [July 9, 2008, 6:39am UTC](https://discuss.rubyonrails.org/t/render-file-in-index/31603 "2008-07-09T06:39:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![torso](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@torso](https://discuss.rubyonrails.org/u/torso)\
**Post date:** [July 9, 2008, 6:39am UTC](https://discuss.rubyonrails.org/t/render-file-in-index/31603/1 "2008-07-09T06:39:33Z")

</div>

Hi

I am trying to render file in controller like this : def index &nbsp;&nbsp;&nbsp;&nbsp;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:** ![bala\_kishore\_puliche](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bala\_kishore\_puliche](https://discuss.rubyonrails.org/u/bala_kishore_puliche)\
**Post date:** [July 9, 2008, 7:47am UTC](https://discuss.rubyonrails.org/t/render-file-in-index/31603/2 "2008-07-09T07:47:50Z")

</div>

u can use send\_data 🙂
