I installed ImageMagick on my 64-bit Windows 7 and I have a copy of Paperclip. My User model looks like this:
class User < ActiveRecord::Base
has_attached_file :photo,
:styles => {
:thumb=> "100x100#",
:small => "150x150>" }
end
In paperclip.rb and development.rb, I have:
Paperclip.options[:command_path] = 'C:/Program Files/ImageMagick-6.6.7-Q16'
My _form looks like this:
<%= form_for(@user, :html => { :multipart => true } ) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :username %><br />
<%= f.text_field :username %>
</div>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :email %><br />
<%= f.text_field :email %>
</div>
<div class="field">
<%= f.label :crypted_password %><br />
<%= f.text_field :crypted_password %>
</div>
<div class="field">
<%= f.label :password_salt %><br />
<%= f.text_field :password_salt %>
</div>
<%= f.file_field :photo%>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
enter code here
When loading an image, the following error appears:
[paperclip] An error was received while processing:
I can use the identifier in my cmd on this image, and it returns metadata about the image without any problems.
Please help if you can. I’ve been stuck on this issue for more than a day.
source
share