# Rails 3 rendering XML problem

**URL:** <https://www.ruby-forum.com/t/rails-3-rendering-xml-problem/194025>\
**Category:** Rails\
**Created:** [August 28, 2010, 7:17am UTC](https://www.ruby-forum.com/t/rails-3-rendering-xml-problem/194025 "2010-08-28T07:17:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcruxen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ecae2f/32.png) [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Post date:** [August 28, 2010, 7:17am UTC](https://www.ruby-forum.com/t/rails-3-rendering-xml-problem/194025/1 "2010-08-28T07:17:24Z")

</div>

I have Rails 3 application (running Rails RC1), and I have the following  
controller:

class PluginsController \< ApplicationController  
respond\_to :html, :xml, :json

def index  
@plugins = Plugin.all  
respond\_with(@plugins)  
end  
end  
If I try to render [http://localhost:3000/plugins](http://localhost:3000/plugins) it works fine, showing  
me the HTML version. If I try to get [http://localhost:3000/plugins.json](http://localhost:3000/plugins.json),  
it also correctly sends me the JSON response.

However if I try [http://localhost:3000/plugins.xml](http://localhost:3000/plugins.xml), I get the following  
error:

Template is missing

Missing template plugins/index with {:locale=\>[:en, :en],  
:formats=\>[:xml],  
:handlers=\>[:rjs, :haml, :erb, :rhtml, :builder, :rxml]} in view paths  
“/Users/fcoury/Projects/backend/app/views”,  
“/Users/fcoury/Projects/backend/vendor/plugins/haml/app/views”,  
“/Users/fcoury/.rvm/gems/ree-1.8.7-2010.01@rails3/bundler/gems/  
devise-6754ae7/app/views”  
Also, my ApplicationController is pretty simple:

class ApplicationController \< ActionController::Base  
protect\_from\_forgery  
layout ‘application’  
end  
I have tried taking out the layout line from the control, but same  
result.

Don’t know if it’s relevant, but I am using HAML and I only have one  
view file called plugins/index.haml.html.

Any ideas why this may be happening?
