title: Form not saving if try to upload image with Paperclip
body: <p>so paperclip, seems as if there is a different way to get it working every time i use it.</p>
  
  <p>So at the moment i try and submit a form but it fails and re renders the form (which is what its supposed to do if the form does not save). </p>
  
  <p>This is my setup so far</p>
  
  <p>Gemfile</p>
  
  <pre><code>gem "paperclip", "~&gt; 3.0"
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>def new
    @post = Post.new
  end
  
  def create
   @user = current_user
   @post = @user.posts.new(params[:post])
    if @post.save
     redirect_to root_path, :notice =&gt; 'Post Successfully Created'
    else
     render :action =&gt; 'new'
    end
  end
  </code></pre>
  
  <p>Post Model</p>
  
  <pre><code>class Post &lt; ActiveRecord::Base
    belongs_to :category
    belongs_to :user
  
   attr_accessible :comments, :title, :category_id, :user_id, :photo
   has_attached_file :photo, :styles =&gt; { :medium =&gt; "300x300&gt;", :thumb =&gt; "100x100&gt;" }
  end
  </code></pre>
  
  <p>Form</p>
  
  <pre><code>&lt;%= form_for @post, :class =&gt; 'post-form',  :html =&gt; { :multipart =&gt; true } do |f| %&gt;
  
  &lt;%= f.label :title, "Title", :class =&gt; 'title_label' %&gt;
  &lt;%= f.text_field :title %&gt;
  
  &lt;%= f.label :category_id, "Choose Category", :class =&gt; 'title_label' %&gt;
  &lt;%= f.collection_select(:category_id, Category.all, :id, :name, :prompt =&gt; "Please Select a Category") %&gt;
  
  &lt;%= f.label :comments, "Comments", :class =&gt; 'title_label'  %&gt;
  &lt;%= f.text_area :comments %&gt;&lt;br&gt;
  
  &lt;%= f.file_field :photo %&gt;
  
  &lt;%= f.submit 'Submit', :class =&gt; 'btn' %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>My migration to add photo was successful as my schema looks like so</p>
  
  <pre><code>create_table "posts", :force =&gt; true do |t|
  t.string   "title"
  t.text     "comments"
  t.integer  "category_id"
  t.integer  "user_id"
  t.datetime "created_at",         :null =&gt; false
  t.datetime "updated_at",         :null =&gt; false
  t.string   "photo_file_name"
  t.string   "photo_content_type"
  t.integer  "photo_file_size"
  t.datetime "photo_updated_at"
  </code></pre>
  
  <p>end</p>
  
  <p>Can anyone see reason why this is not working as expected?</p>
  
  <p>EDIT</p>
  
  <p>Do i need ImageMagick installed to allow the upload of an image or is this just for rendering an image in the view?</p>
  
  <p>ok so from the comments i have started to try and debug and put this in my view</p>
  
  <pre><code>&lt;%= @post.errors.full_messages %&gt;
  </code></pre>
  
  <p>I get this returned</p>
  
  <pre><code>["Photo C:/Users/RICHAR~1/AppData/Local/Temp/bitman20130724-5600-agvtgn.png is not recognized by the 'identify' command.", "Photo C:/Users/RICHAR~1/AppData/Local/Temp/bitman20130724-5600-agvtgn.png is not recognized by the 'identify' command."]
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>