title: Rails 5.2.0 images.attach results in InvalidSignature error
body: <p>I am upgrading to Rails 5.2.0 and attempting to use ActiveStorage to save images from a data feed.  In <code>development.rb</code> I have <code>config.active_storage.service = :local</code> and the model has <code>has_many_attached :images</code> and <code>storage.yml</code> has the default <code>:local</code> settings and the controller action has </p>
  
  <pre><code>def listing_params
        params.require(:listing).permit(:beds, :baths, :price, :parking, :description, :active, :prop_type, :latitude, :longitude, :address, :city, :city_id, :state, :state_id, :zip, :lo_name, :la_fname, :la_lname, :la_phone, :la_email, :mlsid, :cp, :st_number, :st_suffix, :baths_full, :baths_half, :status, :modtime, :st_name, :featured, :school_id, :picture_count, :parking_type, images: [])
      end
  </code></pre>
  
  <p>My code is getting hung up on this line</p>
  
  <p><code>listing.images.attach(pics)</code> with this error: <code>ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature</code></p>
  
  <p>My code:</p>
  
  <pre><code>def perform
      require 'aws-sdk-s3'
      require 'rets'
  
      client = Rets::Client.new({
        login_url: LOGIN_URL,
        username: LOGIN,
        password: PASSWORD,
        version: VERSION
       })
  
      begin
        client.login
      rescue =&gt; e
        puts 'Error: ' + e.message
        exit!
      end
  
      p "Logged in"
  
      Listing.find_each do |listing|
        mlsid = listing.mlsid
        photos = client.objects '*', {
           resource: 'Property',
           object_type: 'Photo',
           resource_id: mlsid
         }
         p "about to attempt to attach #{photos.count} images to listing#{listing.id}"
        pics = []
        photos.each do |data|
          pics &lt;&lt; data.body
        end
        listing.images.attach(pics)
        puts "#{photos.count} images attached to listing##{listing.id}"
      end
    end  
  </code></pre>
  
  <p>And the full error after running with --trace:</p>
  
  <pre><code>tomb$ rake update:listing_images --trace
      ** Invoke update:listing_images (first_time)
      ** Invoke environment (first_time)
      ** Execute environment
      ** Execute update:listing_images
      Cookie#domain returns dot-less domain name now. Use Cookie#dot_domain if you need "." at the beginning.
      "Logged in"
      "about to attempt to attach 16 images to listing2873"
      rake aborted!
      ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/message_verifier.rb:176:in `verify'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activestorage-5.2.0/app/models/active_storage/blob.rb:43:in `find_signed'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activestorage-5.2.0/lib/active_storage/attached.rb:30:in `create_blob_from'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activestorage-5.2.0/lib/active_storage/attached/many.rb:26:in `block in attach'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activestorage-5.2.0/lib/active_storage/attached/many.rb:22:in `collect'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activestorage-5.2.0/lib/active_storage/attached/many.rb:22:in `attach'
      /Users/tomb/Projects/schoolsparrow/app/jobs/listing_image_job.rb:43:in `block in perform'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:70:in `each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:70:in `block in find_each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:238:in `block in in_batches'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:222:in `loop'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:222:in `in_batches'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:135:in `find_in_batches'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/relation/batches.rb:69:in `find_each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/querying.rb:11:in `find_each'
      /Users/tomb/Projects/schoolsparrow/app/jobs/listing_image_job.rb:31:in `perform'
      /Users/tomb/Projects/schoolsparrow/lib/tasks/update.rake:21:in `block (2 levels) in &lt;top (required)&gt;'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
      /Users/tomb/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `&lt;top (required)&gt;'
      /Users/tomb/.rbenv/versions/2.3.7/bin/rake:22:in `load'
      /Users/tomb/.rbenv/versions/2.3.7/bin/rake:22:in `&lt;main&gt;'
      Tasks: TOP =&gt; update:listing_images
  </code></pre>