# Xml missing template

**URL:** <https://www.ruby-forum.com/t/xml-missing-template/151046>\
**Category:** Rails\
**Created:** [October 16, 2008, 10:18am UTC](https://www.ruby-forum.com/t/xml-missing-template/151046 "2008-10-16T10:18:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@matt](https://www.ruby-forum.com/u/matt)\
**Post date:** [October 16, 2008, 10:18am UTC](https://www.ruby-forum.com/t/xml-missing-template/151046/1 "2008-10-16T10:18:11Z")

</div>

Hello,

I am building my first rails 2 app and using xml builder for the first  
time. After digging around I some builder tutorials, yay 🙂 But I  
have quickly run into a problem. When I name my file  
title.xml.builder I get this error:

Template is missing

Missing template search/title.html.erb in view path /home/matt/aws/app/  
views

and when I name my file title.rxml I get no output. If I have the  
file named .html.erb I do get the output that is in the file. I have  
require ‘builder’ in my controller. I am using apache with passanger,  
and I am running in development environment. Just wondering if anyone  
has some input?

Thanks  
Matt

---

<div class="post-metadata">

**Author:** ![matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@matt](https://www.ruby-forum.com/u/matt)\
**Post date:** [October 16, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/xml-missing-template/151046/2 "2008-10-16T13:09:51Z")

</div>

Matt wrote:

> Hello,
> 
> I am building my first rails 2 app and using xml builder for the first  
> time. After digging around I some builder tutorials, yay 🙂 But I  
> have quickly run into a problem. When I name my file  
> title.xml.builder I get this error:
> 
> Template is missing
> 
> Missing template search/title.html.erb in view path /home/matt/aws/app/  
> views
> 
> and when I name my file title.rxml I get no output. If I have the  
> file named .html.erb I do get the output that is in the file. I have  
> require ‘builder’ in my controller. I am using apache with passanger,  
> and I am running in development environment. Just wondering if anyone  
> has some input?
> 
> Thanks  
> Matt

in your browser  
try  
[http://localhost/search/title.xml](http://localhost/search/title.xml)

---

<div class="post-metadata">

**Author:** ![matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@matt](https://www.ruby-forum.com/u/matt)\
**Post date:** [October 16, 2008, 8:00pm UTC](https://www.ruby-forum.com/t/xml-missing-template/151046/3 "2008-10-16T20:00:50Z")

</div>

Hmmm,

when I do that I get a:  
Routing Error  
No route matches “/search/title.xml” with {:method=\>:get}

And also I want to pass in something after title like /search/title/  
dogs or something like that…

On Oct 16, 6:09 am, Sniper A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@matt](https://www.ruby-forum.com/u/matt)\
**Post date:** [October 16, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/xml-missing-template/151046/4 "2008-10-16T22:27:03Z")

</div>

Matt wrote:

> Hmmm,
> 
> when I do that I get a:  
> Routing Error  
> No route matches “/search/title.xml” with {:method=\>:get}

I had much the same error implementing xml builder for the first time  
today also. I ended up mapping a route specifically for it like so:

map.connect ‘/people/export.xml’, :controller =\> ‘people’, :action =\>  
‘export’, :format =\> ‘xml’

It didn’t work like any tutorial I found said it should work but bodging  
it like this seems to work for now.

> And also I want to pass in something after title like /search/title/  
> dogs or something like that…

I think you could do this by modifying the above route.

HTH

Matt
