# No template error when there is a template

**URL:** <https://www.ruby-forum.com/t/no-template-error-when-there-is-a-template/124488>\
**Category:** Rails\
**Created:** [December 29, 2007, 4:23am UTC](https://www.ruby-forum.com/t/no-template-error-when-there-is-a-template/124488 "2007-12-29T04:23:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clemrock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Post date:** [December 29, 2007, 4:23am UTC](https://www.ruby-forum.com/t/no-template-error-when-there-is-a-template/124488/1 "2007-12-29T04:23:24Z")

</div>

Hello,  
I have a method that’s being called from a flash sendAndLoad  
function and, occasionally, our production errors show the rails method  
will  
trigger a no template error.

Here’s the rails method:

```auto
  def get_video_details
    begin
      render :template=>'/rss/get_details'
    rescue Exception => e
      logger.debug("**(get_details) e-->>#{e}")
    end
  end
```

And here’s the template for that method:

```auto
cache({:controller => "widget", :action => "get_details", :id =>
params[:id]}, {:expires => 15.minutes}) do
    ret=''

    @song = Song.find(params[:id])
    if @song && @song.video_url
        response = Net::HTTP.get_response(URI.parse(@song.video_url))
        case response
          when Net::HTTPRedirection then
            ret = response['location']
        else
            logger.error("Either invalid use of get_video_details or
error in video_url for song #{@song.id}:#{@song.video_url}")
        end
    end
-%>
<%=ret-%>
<% end -%>
```

Any ideas how I could be getting this error:

A ActionController::MissingTemplate occurred in  
widget#get\_video\_details:

Missing template  
/u/apps/website/production/current/public/…/config/…/app/views/widget/get\_details.rhtml  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/base.rb:1003:in  
`assert\_existence\_of\_template\_file’

Thanks,  
Eric
