Forum: Ruby on Rails send_data crashing WEBrick under specific conditions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John S. (Guest)
on 2005-11-17 19:30
I have an action with the following view, which seems to be crashing

<%= render_component :controller => 'picture', :action => 'show', :id =>
1 %>
<img src="/images/artgallery.jpg" />
<%= render_component :controller => 'picture', :action => 'show', :id =>
2 %>

The two components (code below) result in image tags that call an action
that returns the image data. If I remove the <img
src="/images/artgallery.jpg" /> tag, this does not occur. Nor does it
occur if both components are given the same id argument (display the
same image).
Often the page will load the first time, but upon refresh the two images
from the component calls will not display and WEBrick will stop

The 'show' action:
def show
	@picture_id = params[:id]
	render :layout => false

The 'show' view:
<img src="<%= url_for(:controller => 'picture', :action => 'picture',
:id => @picture_id) %>" />

The 'picture' action:
def picture
	picture = Picture.find(params[:id])
	send_data(, :filename =>, :type => "image/jpeg",
:disposition => "inline")

The 'data' method in the Picture class
def data + "/" + get_filename).first.to_blob

Does anyone have a clue as to why this may be occuring? Thanks.
This topic is locked and can not be replied to.