# Template is missing

**URL:** <https://discuss.rubyonrails.org/t/template-is-missing/27286>\
**Category:** rubyonrails-talk\
**Created:** [March 31, 2008, 10:45am UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286 "2008-03-31T10:45:06Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bazley1](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bazley1](https://discuss.rubyonrails.org/u/Bazley1)\
**Post date:** [March 31, 2008, 10:45am UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/1 "2008-03-31T10:45:06Z")

</div>

I have installed Ruby, RubyGems, Rails, MySQL and sqlite3. After starting the server and viewing a simple application called 'greeting.rhtml' I get the following message in FireFox:

Template is missing

Missing template app/greeting.html.erb in view path C:/Documents and Settings/Me/Desktop/rubydev/hello/app/views

I am a newbie and really don't know where to go from here. Any suggestions..? Thanks!

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [March 31, 2008, 11:12am UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/2 "2008-03-31T11:12:52Z")

</div>

it's as simple as the message tells you, the file greeting.html.erb in folder C:/Documents and Settings/Me/Desktop/rubydev/hello/app/views is missing.

this should contain the html/erb code to display your data for simple testing/make it run, you can just place an empty file with the name there or put some simple html in it like:

\<h1\>Greeting\</h1\>

that's all to it, you should see the content of the file in your browser

---

<div class="post-metadata">

**Author:** ![Bazley1](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bazley1](https://discuss.rubyonrails.org/u/Bazley1)\
**Post date:** [April 10, 2008, 9:20pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/3 "2008-04-10T21:20:19Z")

</div>

Thanks, it is now working. But I don't really understand - what on earth is a html.erb file? And why does this file work but the .rhtml file doesn't?

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [April 10, 2008, 9:23pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/4 "2008-04-10T21:23:41Z")

</div>

.html.erb is the new name for .rhtml. Both should still work though.

Fred

---

<div class="post-metadata">

**Author:** ![Bazley1](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bazley1](https://discuss.rubyonrails.org/u/Bazley1)\
**Post date:** [April 10, 2008, 9:30pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/5 "2008-04-10T21:30:49Z")

</div>

It's a bit of a niggle that the .rhtml file should work but it doesn't, despite the html.erb file working fine. Is there anything you can recommend I do to investigate and/or fix this..?

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 12, 2010, 11:56am UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/6 "2010-05-12T11:56:08Z")

</div>

Thorsten Mueller wrote:

> it's as simple as the message tells you, the file greeting.html.erb in folder C:/Documents and Settings/Me/Desktop/rubydev/hello/app/views is missing.
> 
> this should contain the html/erb code to display your data for simple testing/make it run, you can just place an empty file with the name there or put some simple html in it like:
> 
> \<h1\>Greeting\</h1\>
> 
> that's all to it, you should see the content of the file in your browser

Hi, I am also new to Ruby on Rails and html....after reading your comment i now know that i need to create a html.erb file but my question is how do i create an html.erb file??? using notepad??? Do i jus type (da file name) followed by html.erb??? I've tried dis but it still says "Template is Missing"

Thanks and hope 2 hear 4m u soon!

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 12, 2010, 12:20pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/7 "2010-05-12T12:20:33Z")

</div>

Bazley wrote:

> It's a bit of a niggle that the .rhtml file should work but it doesn't, despite the html.erb file working fine. Is there anything you can recommend I do to investigate and/or fix this..?

Nothing needs to be "fixed". The .rhtml naming scheme is deprecated in Rails 2, and I believe it's been removed entirely in Rails 3. So don't use it!

If you have a tutorial that uses .rhtml, that's a sure sign that it's out of date. Find a current one.

Best,

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 12, 2010, 12:23pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/8 "2010-05-12T12:23:31Z")

</div>

Dark David wrote:

> Thorsten Mueller wrote:
> 
> > it's as simple as the message tells you, the file greeting.html.erb in folder C:/Documents and Settings/Me/Desktop/rubydev/hello/app/views is missing.
> > 
> > this should contain the html/erb code to display your data for simple testing/make it run, you can just place an empty file with the name there or put some simple html in it like:
> > 
> > \<h1\>Greeting\</h1\>
> > 
> > that's all to it, you should see the content of the file in your browser
> 
> Hi, I am also new to Ruby on Rails and html....after reading your comment i now know that i need to create a html.erb file but my question is how do i create an html.erb file??? using notepad??? Do i jus type (da file name) followed by html.erb??? I've tried dis but it still says "Template is Missing"
> 
> Thanks and hope 2 hear 4m u soon!

It's just a text file. You create it in a text editor, the same way you'd create a plain HTML file for a static website.

A thought: if you don't know how to create static Web pages, then you're not ready to start working with Rails (or any other Web programming framework) quite yet. Learn HTML first, then come back.

Best,

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 12, 2010, 12:36pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/9 "2010-05-12T12:36:28Z")

</div>

> It's just a text file. You create it in a text editor, the same way you'd create a plain HTML file for a static website.
> 
> A thought: if you don't know how to create static Web pages, then you're not ready to start working with Rails (or any other Web programming framework) quite yet. Learn HTML first, then come back.
> 
> Best, -- Marnen Laibow-Koser [http://www.marnen.org](http://www.marnen.org) marnen@marnen.org

Its cool mate, I've solved the problem myself. I was using NOTEPAD before but I tried SciTe and it works.

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [April 4, 2011, 3:59pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/10 "2011-04-04T15:59:40Z")

</div>

Dark David wrote in post #911654:

> Its cool mate, I've solved the problem myself. I was using NOTEPAD before but I tried SciTe and it works.

Strange this would work in one text editor and not the other. It should have been a simple bit of HTML code.

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [April 4, 2011, 4:16pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/11 "2011-04-04T16:16:42Z")

</div>

Are you sure the file created by notepad had the correct full name, possibly it had .txt on the end. You are using Windows after all, perhaps it hid the extension for you.

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [June 29, 2013, 3:32pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/12 "2013-06-29T15:32:37Z")

</div>

Template is missing Missing template salutation/hello, application/hello with {:locale=\>[:en], :formats=\>[:html], :handlers=\>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: \* "C:/Users/RAPHAEL/hello/app/views"

How can I solve this problem ?

---

<div class="post-metadata">

**Author:** ![walterdavis](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/walterdavis/32/705_2.png) [@walterdavis](https://discuss.rubyonrails.org/u/walterdavis)\
**Post date:** [June 29, 2013, 6:04pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/13 "2013-06-29T18:04:57Z")

</div>

Does that file exist at either of the sub-paths indicated, or not? If not, move it there, or create it there. Check also that you may have a folder called 'salutations' (plural) and you may have written salutation/hello in your view or controller (wherever you called render).

Walter

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [June 30, 2013, 4:14am UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/14 "2013-06-30T04:14:43Z")

</div>

Walter Davis wrote in post #1113937:

> Does that file exist at either of the sub-paths indicated, or not? If not, move it there, or create it there. Check also that you may have a folder called 'salutations' (plural) and you may have written salutation/hello in your view or controller (wherever you called render).
> 
> Walter

Dear Walter,

Thank your help.

---

<div class="post-metadata">

**Author:** ![Uday\_Dave](https://avatars.discourse-cdn.com/v4/letter/u/d6d6ee/32.png) [@Uday\_Dave](https://discuss.rubyonrails.org/u/Uday_Dave)\
**Post date:** [November 12, 2013, 3:28pm UTC](https://discuss.rubyonrails.org/t/template-is-missing/27286/15 "2013-11-12T15:28:23Z")

</div>

Thanks walter!! even this helped me! I was so blind to write ‘trail’ for ‘trial’ lol!! 😛

Regards, Ud
