You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadError in Forem::TopicsController#create
cannot load such file -- /root/rails-repo/lib/paperclip_processors/qtfaststart.rb
Extracted source (around line #274):
Paperclip model which checks an upload (its temp file) whether it's an animated GIF. If so it sets attachment_is_animated in the db to true. But, because this job needs to go into the background (DelayedJob), the temp file is probably gone by the time it's needed, which is most likely what's causing the InfiniteInterpolationError.
Started POST "/default/topics" for ::ffff at 2015-04-05 14:05:33 +0000
Processing by Forem::TopicsController#create as HTML
Parameters: {"utf8"=>"�~\~S", "authenticity_token"=>"+6Ma4fmBeexCEFsP9z8b5Af5vJQKarMssAxFdIHMHGEkRcP09T/zgmlVAM4Trb2iHWkHVFGFrHBqO3E8GGAzJw==", "topic
"=>{"subject"=>"sfgfgsfg", "posts_attributes"=>{"0"=>{"text"=>"sfhsg", "photos_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x
00000004502798 @tempfile=#<File:/tmp/RackMultipart20150405-50-183sbay.gif>, @original_filename="test.gif", @content_type="image/gif", @headers="Content-
Disposition: form-data; name=\"topic[posts_attributes][0][photos_attributes][0][attachment]\"; filename=\"test.gif\"\r\nContent-Type: imag
The way DelayedJob works is, it serializes the model, sticks it into the db … till it can be processed. Then it re-marshals it … but this process is fragile.
For example, this bit in the is_animated_gif? method: attachment.queued_for_write[:original]
… that “queued_for_write” … Paperclip stores the uploaded image in a Tmpfile until it gets uploaded to S3. This is not something that could be serialized. The Tmpfile is probably deleted before the DelayedJob runs. Also, I remember during one Paperclip upgrade, they broke that method … I don’t think it works the same way in newer versions.