Rails Paper Clip upload not working... No error thrown, rolls back transaction
<p>EDIT: I've managed to get it to start throwing errors by changing the model to this:</p>

<pre><code>class User &lt; ApplicationRecord
    has_secure_password

    has_attached_file :avatar, 
        :path =&gt; ":rails_root/public/system/:attachment/:id/:basename_:style.:extension",
        :url =&gt; "/system/:attachment/:id/:basename_:style.:extension",
        :styles =&gt; {
          :thumb    =&gt; ['100x100#',  :jpg, :quality =&gt; 70],
          :preview  =&gt; ['480x480#',  :jpg, :quality =&gt; 70],
          :large    =&gt; ['600&gt;',      :jpg, :quality =&gt; 70],
          :retina   =&gt; ['1200&gt;',     :jpg, :quality =&gt; 30]
        },
        :convert_options =&gt; {
          :thumb    =&gt; '-set colorspace sRGB -strip',
          :preview  =&gt; '-set colorspace sRGB -strip',
          :large    =&gt; '-set colorspace sRGB -strip',
          :retina   =&gt; '-set colorspace sRGB -strip -sharpen 0x0.5'
        }

    validates_attachment :avatar,
        :presence =&gt; true,
        :size =&gt; { :in =&gt; 0..10.megabytes },
        :content_type =&gt; { :content_type =&gt; /^image\/(jpeg|png|gif|tiff)$/ }

    belongs_to :leitung
    def admin?
        self.role == "Admin"
    end
    def al?
        self.role == "Al"
    end
end
</code></pre>

<p>Console now looks like this:</p>

<pre><code>Started POST "/leiter/new" for 127.0.0.1 at 2017-01-01 17:11:59 +0000
Processing by Leiter::UsersController#create as HTML
  Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"2z3H8rWo2TLADJtx3kWiCufulyLSBzLLCrxLGaLFH9BWOlGtMZ7BuPFCte8cEY5fC6yFVVggbi6vhESWLFFlRA==", "user"=&gt;{"first_name"=&gt;"asdf", "last_name"=&gt;"asdf", "pfadi_name"=&gt;"asdf", "email"=&gt;"asdf@asdf.asdf", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]", "leitung_id"=&gt;"1", "role"=&gt;"asdf", "avatar"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x007feb301d8058 @tempfile=#&lt;Tempfile:/tmp/RackMultipart20170101-6509-1yifkdk.jpg&gt;, @original_filename="nobody_m.original.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"nobody_m.original.jpg\"\r\nContent-Type: image/jpeg\r\n"&gt;}, "commit"=&gt;"Create an account"}
  User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?  [["id", 3], ["LIMIT", 1]]
Command :: file -b --mime '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-tn2f1u.jpg'
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-q2rz7h.jpg[0]' 2&gt;/dev/null
[paperclip] An error was received while processing: #&lt;Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError&gt;
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-q2rz7h.jpg[0]' 2&gt;/dev/null
[paperclip] An error was received while processing: #&lt;Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError&gt;
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-q2rz7h.jpg[0]' 2&gt;/dev/null
[paperclip] An error was received while processing: #&lt;Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError&gt;
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-q2rz7h.jpg[0]' 2&gt;/dev/null
[paperclip] An error was received while processing: #&lt;Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError&gt;
   (0.1ms)  begin transaction
Command :: file -b --mime '/tmp/3068f4f020f8c43d300b1e06b58b829b20170101-6509-1p20xan.jpg'
  Leitung Load (0.2ms)  SELECT  "leitungen".* FROM "leitungen" WHERE "leitungen"."id" = ? LIMIT ?  [["id", 1], ["LIMIT", 1]]
   (0.0ms)  rollback transaction
Redirected to http://localhost:3000/leiter/new
Completed 302 Found in 136ms (ActiveRecord: 0.4ms)
</code></pre>

<p>However, the usual fix to this problem, setting the development.rb file to this didn't work:</p>

<pre><code>Paperclip.options[:command_path] = "/usr/local/bin/"
</code></pre>

<p>(Start of OP:) I'm working on setting up paperclip (with ImageMagick) so that users on my app can upload avatars for their account. The avatars should be saved locally on the server (speak my PC as the app is in development only at the moment). I followed the documentation on GitHub to set up paperclip. Everything seems to be working... Right until I try to actually upload an image. After I submit (in this case editing an existing user to add an image, but the same thing happens when creating a new user), it doesn't throw an error or anything, it just reloads the page and grays out the submit button. The following message appears in the console:</p>

<pre><code>    Started PUT "/leiter/edit" for 127.0.0.1 at 2016-12-31 18:33:19 +0000
  ActiveRecord::SchemaMigration Load (0.1ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Leiter::UsersController#update as HTML
  Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"RjjDgMQESgZ/9DVXTWoTvJDitAmYXqfMyVJJyKpXDsp3hE0dejJ6erMlV+wsFEH9bFlz7ZsvBlgPO63o8PkpYw==", "user"=&gt;{"first_name"=&gt;"Admin", "last_name"=&gt;"Admin", "pfadi_name"=&gt;"Admin", "email"=&gt;"admin@application.com", "leitung_id"=&gt;"6", "role"=&gt;"Admin", "avatar"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x00000003671238 @tempfile=#&lt;Tempfile:/tmp/RackMultipart20161231-3455-mekx7p.jpg&gt;, @original_filename="nobody_m.original.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"nobody_m.original.jpg\"\r\nContent-Type: image/jpeg\r\n"&gt;}, "commit"=&gt;"Speichern"}
  User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?  [["id", 1], ["LIMIT", 1]]
   (0.1ms)  begin transaction
Command :: PATH=/usr/local/bin/:$PATH; file -b --mime '/tmp/3068f4f020f8c43d300b1e06b58b829b20161231-3455-1vvcs8q.jpg'
Command :: PATH=/usr/local/bin/:$PATH; file -b --mime '/tmp/3068f4f020f8c43d300b1e06b58b829b20161231-3455-1cldo2f.jpg'
  Leitung Load (0.2ms)  SELECT  "leitungen".* FROM "leitungen" WHERE "leitungen"."id" = ? LIMIT ?  [["id", 6], ["LIMIT", 1]]
   (0.1ms)  rollback transaction
No template found for Leiter::UsersController#update, rendering head :no_content
Completed 204 No Content in 81ms (ActiveRecord: 1.4ms)
</code></pre>

<p>In the views, anywhere the image is supposed to appear, it says missing instead. Interesting is that it lets me create and update users if I don't upload an image, even though I have the image required in the parameters.
I am absolutely clueless as to why this happens. If it helps, here are is my user model, my controllers etc.:</p>

<p>User Model:</p>

<pre><code>class User &lt; ApplicationRecord
    has_secure_password
    has_attached_file :avatar, styles: { medium: "300x300&gt;", thumb: "100x100&gt;" }, default_url: "/images/:style/missing.png"
    validates_attachment_content_type :avatar, :content_type =&gt; ["avatar/jpg", "avatar/jpeg", "avatar/png", "avatar/gif"]
    belongs_to :leitung
    def admin?
        self.role == "Admin"
    end
    def al?
        self.role == "Al"
    end
end
</code></pre>

<p>Users Controller:</p>

<pre><code>class Leiter::UsersController &lt; ApplicationController
    def new
        @newuser = User.new
    end
    def edit
        @user = User.find(session[:user_id])
    end
    def update
        @user = User.find(session[:user_id])
        if @user.update_attributes(user_params) then
            redirect_to '/leiter'
        end
    end
    def create 
      @user = User.new(user_params) 
      if @user.save 
        redirect_to '/leiter'
      else 
        redirect_to '/' 
      end 
    end

    private

    def user_params
      params.require(:user).permit(:first_name, :last_name, :pfadi_name, :email, :password, :password_confirmation, :leitung_id, :role, :avatar)
    end
end
</code></pre>

<p>View to update user:</p>

<pre><code>&lt;%= simple_form_for @user, url: {action: "edit"}, html: { method: :put } do |f| %&gt;
    &lt;%= f.text_field :first_name, :placeholder =&gt; "First name" %&gt;&lt;br&gt;
    &lt;%= f.text_field :last_name, :placeholder =&gt; "Last name" %&gt;&lt;br&gt;
    &lt;%= f.text_field :pfadi_name, :placeholder =&gt; "Pfadi name" %&gt;&lt;br&gt;
    &lt;%= f.email_field :email, :placeholder =&gt; "Email" %&gt;&lt;br&gt;
    &lt;%= f.association :leitung, :placeholder =&gt; "Leitung" %&gt;&lt;br&gt;
    &lt;%= f.text_field :role, :placeholder =&gt; "Rolle" %&gt;&lt;br&gt;
    &lt;%= f.input :avatar, as: :file %&gt;
    &lt;%= f.submit "Speichern", class: "btn-submit" %&gt;
&lt;% end %&gt;
</code></pre>

<p>If you need additional information, I can provide it. Thank you for helping, I'm sure I've made some trivial mistake, but I can't find it... I'm new to rails, but its been very fun so far!</p>

<p>EDIT:</p>

<pre><code>gem 'rails', '~&gt; 5.0.0', '&gt;= 5.0.0.1'
gem "paperclip", "~&gt; 5.0.0"
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
</code></pre>