title: Basecamp's Trix WYSIWYG editor gem not saving file attachment in Rails 4 app
body: <p>I added the Trix editor <a href="https://github.com/maclover7/trix" rel="noreferrer">gem</a> to my Rails 4 app and followed the instructions on that page exactly. The text is displaying correctly after I save a post (bold/italic/strikethrough/paragraph spacing all good), BUT any images that I drag into the text editor disappear when I save the post. What am I doing wrong?</p>
  
  <p>Thanks.</p>
  
  <p><strong>app/assets/stylesheets/application.scss:</strong></p>
  
  <pre><code>/*
      *= require_self
      *= require trix 
  */
  
  @import "bootstrap";
  @import "bootstrap-sprockets";
  @import "font-awesome"; 
  @import url(https://fonts.googleapis.com/css?family=Delius+Swash+Caps);
  @import url(https://fonts.googleapis.com/css?family=Reenie+Beanie);
  @import url(https://fonts.googleapis.com/css?family=Special+Elite);
  @import url(https://fonts.googleapis.com/css?family=Londrina+Shadow);
  </code></pre>
  
  <p><strong>app/assets/javascripts/application.js:</strong></p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require bootstrap-sprockets
  //= require bootstrap
  //= require trix
  //= require_tree .
  </code></pre>
  
  <p><strong>_form.html.erb:</strong></p>
  
  <pre><code>&lt;%= form_for @article, html: {multipart: true} do |f| %&gt;
    &lt;p&gt;
      &lt;%= f.label :image %&gt;
      &lt;%= f.file_field :image %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.label :title %&gt;
      &lt;%= f.text_field :title %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.label :subtitle %&gt;
      &lt;%= f.text_field :subtitle %&gt;
    &lt;/p&gt;
  
    &lt;%= f.label :text %&gt;
    &lt;%= f.trix_editor :text, class: 'trix-content' %&gt;
  
    &lt;p&gt;
      &lt;%= f.label :tags %&gt;
      &lt;%= f.text_field :tag_list %&gt;
    &lt;/p&gt;
  
    &lt;p&gt;
      &lt;%= f.submit %&gt;
    &lt;/p&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>new.html.erb</strong></p>
  
  <pre><code>&lt;div class="container"&gt; 
      &lt;div class="jumbotron"&gt;
          &lt;div class="row"&gt;
          &lt;div class="col-md-8 col-md-offset-2"&gt;
              &lt;h1&gt;New article&lt;/h1&gt;
                  &lt;%= render 'form' %&gt;
                  &lt;%= link_to 'Back', articles_path %&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Gemfile:</strong></p>
  
  <pre><code>gem 'rails', '4.2.2'
  gem 'pg'
  gem 'sass-rails', '~&gt; 5.0'
  gem 'uglifier', '&gt;= 1.3.0'
  gem 'coffee-rails', '~&gt; 4.1.0'
  gem 'jquery-rails'
  gem 'bootstrap-sass', '~&gt; 3.3', '&gt;= 3.3.6'
  gem 'devise', '~&gt; 3.5', '&gt;= 3.5.6'
  gem "font-awesome-rails"
  gem 'paperclip', '~&gt; 4.2'
  gem 'aws-sdk', '~&gt; 1.66'
  gem 'figaro', '~&gt; 1.1', '&gt;= 1.1.1'
  gem 'simple_form'
  gem 'mail_form'
  gem 'acts-as-taggable-on', '~&gt; 3.4'
  gem 'fog'
  gem 'rmagick', '~&gt; 2.15', '&gt;= 2.15.4'
  gem 'carrierwave'
  gem "fog-aws"
  gem 'trix', '~&gt; 0.9.0'
  gem 'jbuilder', '~&gt; 2.0'
  gem 'sdoc', '~&gt; 0.4.0', group: :doc
  </code></pre>