# Template is Missing

**URL:** <https://www.ruby-forum.com/t/template-is-missing/69170>\
**Category:** Rails\
**Created:** [September 19, 2006, 4:16am UTC](https://www.ruby-forum.com/t/template-is-missing/69170 "2006-09-19T04:16:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 4:16am UTC](https://www.ruby-forum.com/t/template-is-missing/69170/1 "2006-09-19T04:16:44Z")

</div>

I’m trying to learn to debug my Rails code. What types of errors cause  
the “Template is Missing” error? Coming from a php environment, this  
appears cryptic - but I’m betting it should be obvious to me.

Thanks in advance  
—Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 5:45am UTC](https://www.ruby-forum.com/t/template-is-missing/69170/2 "2006-09-19T05:45:56Z")

</div>

You probably have a method in your controller which has no corresponding  
.rhtml, .rjs or .rxml (maybe?) file in views/your\_controller\_name.

You need at least one of those for each of your public controller  
methods…  
I think. If you’re writing methods where you won’t have any  
corresponding  
webpage, rjs scripts, etc then make a private method or a helper method.

I think that’s all right. I’m sure someone more knowledgeable than me  
will  
point me out if I’ve led you astray.

On 9/18/06, Michael S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Terry (TAD) Donaghe  
[http://www.tadspot.com](http://www.tadspot.com)

> **[太阳集团0638开头的网址✅【欢迎下载】](http://www.rubynoob.com)**
>
> 太阳集团0638开头的网址是一家创办历史悠久并且具有非常高的知名度的在线网娱乐平台为大家提供一个良好的彩票交流平台。

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/3 "2006-09-19T16:10:02Z")

</div>

Terry D. wrote:

> I think that’s all right. I’m sure someone more knowledgeable than me  
> will  
> point me out if I’ve led you astray.

Thanks for your info. I’m hoping to get several responses. I’m trying to  
learn Rails, and some of the concepts are foreign to the “traditional”  
way of doing thing.

Thanks again.  
—Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 4:39pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/4 "2006-09-19T16:39:27Z")

</div>

Hi Michael,

Michael S. wrote:

> I’m trying to learn Rails, and some of the concepts  
> are foreign to the “traditional” way of doing thing.

Depends on how far back your “tradition” goes 😉 A lot of the concepts  
in  
Rails were used in client/server computing. But if a person’s  
experience  
base didn’t predate the web (i.e., going on 8-10 years now), I imagine  
concepts like MVC and solid OO language constructs could be new. Many  
Rails  
concepts aren’t so much new as they are new to the web development  
domain.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 6:00pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/5 "2006-09-19T18:00:25Z")

</div>

Michael,

If you don’t already have it, I very strongly recommend that you buy the  
2nd  
Edition of Agile Web D. with Rails from  
the pragmattic programmers. It’s currently only available as a PDF  
purchase, but it’s well worth every penny and will teach you the  
“traditional” ways to do rails, more or less.

Check here:

[http://www.pragmaticprogrammer.com/titles/rails2/index.html](http://www.pragmaticprogrammer.com/titles/rails2/index.html)

On 9/19/06, Bill W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> in
> 
> >

–  
Terry (TAD) Donaghe  
[http://www.tadspot.com](http://www.tadspot.com)

> **[太阳集团0638开头的网址✅【欢迎下载】](http://www.rubynoob.com)**
>
> 太阳集团0638开头的网址是一家创办历史悠久并且具有非常高的知名度的在线网娱乐平台为大家提供一个良好的彩票交流平台。

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/6 "2006-09-19T18:56:37Z")

</div>

Michael S. wrote:

> Bill W. wrote:
> 
> > Depends on how far back your “tradition” goes 😉
> 
> I go back to 1970. I’ve been in the field a _LONG_ time.

Damn! That IS a _LONG_ time 😉 I didn’t get started til '80.

> It still begs the original question. What types of errors in  
> the code cause a “Template is missing” error.

The previous reply from Terry D. was correct with respect to what  
causes the error: lack of a View. The default view that Rails looks  
for is  
one that has the same name as the controller action last executed in the  
request/response cycle. The view used can be explicitly over-ridden in  
the  
controller action with either render or redirect\_to. The render can  
also be  
used to tell Rails not to render anything at all which is especially  
helpful  
when you’re using Ajax to update the database incrementally.

The largest cause of the error for me has been fat-fingered typos.

I’ll also second Terry’s suggestion re: reading material.

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 5:44pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/7 "2006-09-19T17:44:51Z")

</div>

Bill W. wrote:

> Hi Michael,
> 
> Michael S. wrote:
> 
> > I’m trying to learn Rails, and some of the concepts  
> > are foreign to the “traditional” way of doing thing.
> 
> Depends on how far back your “tradition” goes 😉

I go back to 1970. I’ve been in the field a _LONG_ time.

> A lot of the concepts  
> in  
> Rails were used in client/server computing. But if a person’s  
> experience  
> base didn’t predate the web (i.e., going on 8-10 years now), I imagine  
> concepts like MVC and solid OO language constructs could be new. Many  
> Rails  
> concepts aren’t so much new as they are new to the web development  
> domain.

I won’t argue that at all. While you _CAN_ program objects in PHP, it is  
kinda an add-on (I’m sure I’ll get yelled at for that - but it is). Ruby  
starts out object oriented. It still begs the original question. What  
types of errors in the code cause a “Template is missing” error. It  
helps to have a starting point to debug.

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [September 19, 2006, 9:12pm UTC](https://www.ruby-forum.com/t/template-is-missing/69170/8 "2006-09-19T21:12:13Z")

</div>

Terry D. wrote:

> Michael,
> 
> If you don’t already have it, I very strongly recommend that you buy the  
> 2nd  
> Edition of Agile Web D. with Rails from  
> the pragmattic programmers. It’s currently only available as a PDF  
> purchase, but it’s well worth every penny and will teach you the  
> “traditional” ways to do rails, more or less.

I have it and can’t praise it high enough. It’s a mojor reference for me

- not the only reference, of course, but an important one.

—Michael
