# "No rhtml, rxml, rjs or delegate template found" -- help!

**URL:** <https://www.ruby-forum.com/t/no-rhtml-rxml-rjs-or-delegate-template-found-help/84766>\
**Category:** Rails\
**Created:** [February 7, 2007, 3:46pm UTC](https://www.ruby-forum.com/t/no-rhtml-rxml-rjs-or-delegate-template-found-help/84766 "2007-02-07T15:46:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rph](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@rph](https://www.ruby-forum.com/u/rph)\
**Post date:** [February 7, 2007, 3:46pm UTC](https://www.ruby-forum.com/t/no-rhtml-rxml-rjs-or-delegate-template-found-help/84766/1 "2007-02-07T15:46:11Z")

</div>

I have some static partials that do not belong to any controller, and  
don’t actually have ruby code in them (which should be irrelevant  
anyway). I have to read the files in, and allow a user to click  
next/prev to navigate through them. I can read the directories fine,  
get access to the files, etc., but I’m having trouble with the  
application knowing about my custom folder in the “views” directory (I  
think).

Here’s what I’m doing on page load (which isn’t working):

\<% render :partial =\>  
“#{CONTENT\_BASE}/#{@thing.folder\_title}/#{make\_partial(@random\_file)}”  
%\>

Here’s an explanation:

# in environment.rb

CONTENT\_BASE = “#{RAILS\_ROOT}/app/views/content”

# @thing.folder\_title

=\> the\_parent\_folder

# make\_partial(\_random.rhtml)

=\> random

So if I print out this line, without rendering the partial, I get the  
correct path:

# looking at the path

“./script/…/config/…/app/views/content/the\_parent\_folder/random”

But I’m getting the error ActionView error “No rhtml, rxml, rjs or  
delegate template found”

Is there something I’m missing? Can you not reference a static partial  
if it doesn’t belong to a controller? How can I get my application to  
understand this? Thanks!

---

<div class="post-metadata">

**Author:** ![rph](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@rph](https://www.ruby-forum.com/u/rph)\
**Post date:** [February 7, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/no-rhtml-rxml-rjs-or-delegate-template-found-help/84766/2 "2007-02-07T15:58:52Z")

</div>

Rails assumes that the path specified for a partial is located under  
app/view … not the full-path. Therefore you just need to change your  
CONTENT\_BASE to be “content”. Also make sure you use  
\<%= %\> and not \<% %\>

-Bill

---

<div class="post-metadata">

**Author:** ![rph](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@rph](https://www.ruby-forum.com/u/rph)\
**Post date:** [February 7, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/no-rhtml-rxml-rjs-or-delegate-template-found-help/84766/3 "2007-02-07T16:56:09Z")

</div>

Bill S. wrote:

> Rails assumes that the path specified for a partial is located under  
> app/view … not the full-path. Therefore you just need to change your  
> CONTENT\_BASE to be “content”. Also make sure you use  
> \<%= %\> and not \<% %\>
> 
> -Bill

Thank you… that worked.
