-
Notifications
You must be signed in to change notification settings - Fork 245
Description
I faced a problem using delayed_paperclip gem.
I had already set up according to the direction on manual.
When I insert the code "process_in_background" on the relevant model, custom styles of paperclip aren't generated but the original file is well uploaded to server.
I confirmed that all styles of paperclip are well generated without "process_in_background".
My Gemfile is as follows:
gem 'paperclip'
gem 'paperclip-ffmpeg'
gem 'delayed_paperclip', :git => 'git://github.com/tommeier/delayed_paperclip.git', :ref => '98a8b9e0c24d24c94e2c9c39a704c1b07c5c4d6b'
gem 'daemons'
gem 'delayed_job_active_record'
gem 'delayed_job_web'
In Post model,
class Post < ActiveRecord::Base
attr_accessible :title, :attach
has_attached_file :attach, :styles => { :medium => "300x300>", :thumb => "100x100>" }
process_in_background :attach
end
in app/views/posts/_form.html.erb,
<%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
<ul>
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :attach %>
<%= f.file_field :attach %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
At this context, when I submit the above form attached with some image file, :medium and :thumb custom styles are not generated at the public/system/attaches directory.
But, when I comment out the line of "process_in_background" in post model, all styles are well generated.
So I think that with "process_in_background", convert function of imagemagick doesn't work. Is that right?
Is there any solution about this?