 <p>You need define your post contain some file inside with multipart HTML tag</p> <pre><code>&lt;%= semantic_form_for @imgD, :html =&gt; { :multipart =&gt; true } do |form| %&gt; &lt;%= form.input :img%&gt; &lt;%= form.actions %&gt; &lt;%end%&gt; </code></pre>