PDA

View Full Version : No template error when there is a template


clem_c_rock
December 28th, 2007, 10:24 PM
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:


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:


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