Hi all,

I have a problem with mongrel-1.1.2 running with Apache Apache/2.0.61
and MySQL 5.0.45 on FreeBSD 6.1.

I'm developing my application with InstantRails that uses Mongrel and
everything is working great. I have about 30 shops in a table. I also
store the logo images (png files) in the table for each shop. Under
Windows/InstantRails everything is working correct.

When i however copy the application to the Unix Box, start Mongrel and
load the page i get an error in the mongrel.log file with following
text:


** Changing group to "www".
** Changing user to "www".
** Installing debugging prefixed filters. Look in log/mongrel_debug for
the files.
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no
restart).
** Rails signals registered.  HUP => reload (without restart).  It might
not work well.
** Mongrel 1.1.2 available at 0.0.0.0:3000
** Writing PID file to tmp/pids/mongrel.pid



127.0.0.1 - [Thu, 03 Jan 2008 10:22:49 GMT] "GET /de/page HTTP/1.1"
Thu Jan 03 11:22:51 +0100 2008: Read error: #<Errno::EPERM: Operation
not permitted>
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/http_response.rb:137:in
`write'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/http_response.rb:137:in
`write'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/http_response.rb:103:in
`send_body'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/http_response.rb:147:in
`finished'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:165:in
`process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:285:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:285:in
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:285:in
`new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:285:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:268:in
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:268:in
`new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel.rb:268:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/configurator.rb:282:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/configurator.rb:281:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/configurator.rb:281:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/mongrel_rails:128:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/command.rb:212:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/mongrel_rails:281
/usr/local/bin/mongrel_rails:16:in `load'
/usr/local/bin/mongrel_rails:16

This error message tells me that there is an error in the
http_response.rb file happening at the method send_data. But i could not
determine what the problem is exactly. As everything is working with
InstantRails i really don't know where to start searching the problem as
the code in my eyes should be working.

When i remove the "image_tag" line from the rhtml file so that the
images are not loading, then the browser is loading everything. If the
"image_tag" line is present, then the browser will stop after 2 thirds
of displaying the html.

So it seems an image can not be loaded or displayed.

<% @topshops.each do |shop| %>
          <table width="100%"  border="0" cellspacing="0"
cellpadding="0">
            <tr>
              <td class="shops"><table width="100%"  border="0"
cellspacing="0" cellpadding="5">
                  <tr valign="top">
                    <td width="150"><%=
image_tag("/[EMAIL PROTECTED]:locale]}/page/show_picture_of_partner/#{shop.id}",
:alt => shop.name) %></td>
                    <td><strong><%= shop.name %></strong><br>
                        <br>
                         <%= shop.shop_description %>
                    </td>
                  </tr>
                  <tr>
                    <td class="details" width="150"><img
src="/images/pagedesign/arrow.gif" width="13" height="13"
align="absmiddle"> <%= link_to "Registrieren", :controller => 'page',
:action => 'register' %></td>
                    <td class="points"><img
src="/images/pagedesign/logo_points.gif" width="13" height="13"
align="absmiddle"> <%= shop.points_text %> <img
src="/images/pagedesign/arrow.gif" width="13" height="13"
align="absmiddle"> <%= link_to "Details", :action => shop.symbol %></td>
                  </tr>
              </table></td>
            </tr>
          </table>
          <br>
<% end %>


show_picture_of_partner:
def show_picture_of_partner
       partner = Partner.find(params[:id])
       send_data(partner.picture_data, :type =>
partner.picture_content_type, :filename => partner.picture_name,
:dispositon => 'inline')
    end

Can anybody tell me what the problem could be? Or what to do better to
get around this problem?

Thanks,
Chris
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to