thoughtbot/paperclip — Issue #654: Wrong redirect after post
Author: babalooi
Created: 2011-11-25 15:12:57+00:00
State: open

Hi.
When trying u upload photo, paperclip generates extra url segment.
like this:
http://alfaplan.host25.com/en/en/photos

Found out that disabling security_mod in Apache solves the problem but I don't think that's a very good idea.
http://railsforum.com/viewtopic.php?id=42079

This error shows up only when uploading form with paperclip data.

Configuration is
Rails 3.0.9
Ruby 1.8.7
Paperclip 2.4.5
ImageMagick 6.4.8 Q16 OpenMP

Server log file:
--
Started POST "/hr/references/1" for 78.0.196.78 at Wed Nov 23 12:55:11 +0100 2011
Processing by ReferencesController#update as HTML
Parameters: {"reference"=>{"name_en"=>"Test Reference", "position"=>"1", "name_hr"=>"Test Referenca"...}
[paperclip] Saving attachments.
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/medium/katalog-zaks_012-l.jpg
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/thumb/katalog-zaks_012-l.jpg
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/original/katalog-zaks_012-l.jpg
Redirected to http://alfaplan.host25.com/hr/hr/references
Completed 302 Found in 1344ms

Started GET "/hr/hr/references" for 78.0.196.78 at Wed Nov 23 12:55:12 +0100 2011
ActionController::RoutingError (No route matches "/hr/hr/references"):