title: Ruby 1.87 Rails 3.03 and Devise. Paperclip image not being saved although it says it is in log file
body: <p>I have gotten paperclip to work on my system without a problem.  In this recent app that I have been building, for some reason I can't get paperclip to save the image, even though the log file says it is, it doesn't show up in the sql datase either.</p>
  
  <p>The only difference that I have, is using Devise and wondering if there is some extra setup I need to change with it.</p>
  
  <p>The log file says:</p>
  
  <pre><code>Started POST "/users/1" for 127.0.0.1 at Fri Dec 10 14:56:52 -0800 2010
  </code></pre>
  
  <p>Processing by UsersController#update as HTML
    Parameters: {"commit"=>"Update", "authenticity_token"=>"JexxammsT+VPzqwbLr/YohuY4vcpBFdfVrOwDjDQEUo=", "utf8"=>"✓", "id"=>"1", "user"=>{"avatar"=>#, @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"Nice-Smile.jpg\"\r\nContent-Type: image/jpeg\r\n", @content_type="image/jpeg", @original_filename="Nice-Smile.jpg">}}
    User Load (3.1ms)  SELECT "users".* FROM "users" WHERE ("users"."id" = 1) LIMIT 1
    User Load (0.5ms)  SELECT "users"."id" FROM "users" WHERE ("users"."email" = 'mrussellharrison@gmail.com') AND ("users".id &lt;> 1) LIMIT 1
  [paperclip] Saving attachments.
  Redirected to <a href="http://localhost:3000/users/1" rel="nofollow">http://localhost:3000/users/1</a>
  Completed 302 Found in 124ms</p>
  
  <p>Started GET "/users/1" for 127.0.0.1 at Fri Dec 10 14:56:52 -0800 2010
    Processing by UsersController#show as HTML
    Parameters: {"id"=>"1"}
    User Load (3.1ms)  SELECT "users".* FROM "users" WHERE ("users"."id" = 1) LIMIT 1
    CACHE (0.0ms)  SELECT "users".* FROM "users" WHERE ("users"."id" = 1) LIMIT 1
  Rendered users/_basic_info.html.erb (2.0ms)
  Rendered layouts/_stylesheets.html.erb (5.2ms)
  Rendered layouts/_header.html.erb (12.1ms)
  Rendered layouts/_footer.html.erb (2.4ms)
  Rendered users/show.html.erb within layouts/application (47.2ms)
  Completed 200 OK in 167ms (Views: 62.2ms | ActiveRecord: 6.6ms)</p>
  
  <p>Started GET "/avatars/small/missing.png" for 127.0.0.1 at Fri Dec 10 14:56:53 -0800 2010</p>
  
  <p>Started GET "/avatars/small/missing.png" for 127.0.0.1 at Fri Dec 10 14:56:53 -0800 2010</p>
  
  <p>ActionController::RoutingError (No route matches "/avatars/small/missing.png"):</p>
  
  <p>Here is my users controller:</p>
  
  <pre><code>  class UsersController &lt; ApplicationController
    def home
      @user = User.find(params[:id])
    end
  
    def index
      @user = User.all
      @title = "All users"
    end
  
    def show
      @user = User.find(params[:id])
      @title = current_user.first_name
    end
  
    def create
      @user = User.new(params[:user])
      if @user.save
        flash[:notice] = "Profile Updated"
        redirect_to @user
      else
        render :action =&gt; 'new'
      end
    end
  
    def update
      @user = User.find(params[:id])
      if @user.update_attributes(params[:product])
        flash[:notice] = "Profile Updated"
        redirect_to @user
      else
        render :action =&gt; 'edit'
      end
    end
  
  
  end
  </code></pre>
  
  <p>And here is my User Model:</p>
  
  <pre><code>  class User &lt; ActiveRecord::Base
    # Include default devise modules. Others available are:
    # :token_authenticatable, :lockable, :timeoutable and :activatable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :email, :password, :password_confirmation, :first_name, :last_name, :avatar
    attr_accessible :bio, :sex, :birthday, :facebook, :twitter, :hometown, :current_city, :interested_in, :looking_for
  
    validates :first_name,  :presence =&gt; true,  
                      :length   =&gt; { :maximum =&gt; 50 }
  
    validates :last_name,  :presence =&gt; true,  
                      :length   =&gt; { :maximum =&gt; 50 }
  
    has_attached_file :avatar, :styles =&gt; { :thumb  =&gt; "50x50#",
                                            :small  =&gt; "150x150&gt;",
                                            :medium =&gt; "300x200&gt;",
                                            :large  =&gt; "600x600&gt;"   },
                      :url  =&gt; "/assets/users/:id/:basename/:style.:extension",
                      :path =&gt; ":rails_root/public/assets/users/:id/:basename/:style.:extension"
  
  
    validates_attachment_size :avatar, :less_than =&gt; 5.megabytes
    validates_attachment_content_type :avatar, :content_type =&gt; ['image/jpeg', 'image/jpg', 'image/png', 'image/gif']
  
  
  end
  </code></pre>
  
  <p>I have tried many things over and over again, but not sure why the file isn't being saved.  Thanks for any help in advance.</p>