title: "no implicit conversion of nil into String" error for carrierwave multiple image upload
body: <p>This is bugging me for days now. I have tried different method . So I would go with the simplest form , that should be working but doesnt.</p>
  
  <p>I have two models. <code>Institute</code>, and <code>VirtualTour</code>.</p>
  
  <pre><code>class Institute &lt; ActiveRecord::Base
    mount_uploader :virtual_images, VirtualPicUploader
  
    has_many :virtual_tours, dependent: :destroy
    accepts_nested_attributes_for :virtual_tours,allow_destroy: true
  end
  
  
  class VirtualTour &lt; ActiveRecord::Base
    belongs_to :institute
    mount_uploader :image, VirtualPicUploader
  end
  </code></pre>
  
  <p>I amusing <code>devise</code> for institute. Strong Parameters are not being considered for this simpler version so I will keep it like this.</p>
  
  <pre><code>  def account_update
        default_params.permit!
    end
  </code></pre>
  
  <p>This upload happens in while editing thats why account_update is used. </p>
  
  <pre><code>&lt;%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put ,  multipart: true }) do |f| %&gt;
    &lt;%= f.fields_for :virtual_tours do |ff| %&gt;
     &lt;%= ff.file_field :image, multiple: true %&gt;
     &lt;%= ff.hidden_field :institute_id, value: f.object.id %&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I get this error in browser when I submit.</p>
  
  <pre><code>   no implicit conversion of nil into String
  
     def cache_path
        File.expand_path(File.join(cache_dir, cache_name), root)
     end
  </code></pre>
  
  <p>And in the log ,
  Completed 500 Internal Server Error in 91ms (ActiveRecord: 1.8ms)</p>
  
  <pre><code>TypeError (no implicit conversion of nil into String):
    carrierwave (0.10.0) lib/carrierwave/uploader/cache.rb:159:in `join'
    carrierwave (0.10.0) lib/carrierwave/uploader/cache.rb:159:in `cache_path'
    carrierwave (0.10.0) lib/carrierwave/uploader/cache.rb:131:in `block in cache!'
    carrierwave (0.10.0) lib/carrierwave/uploader/callbacks.rb:17:in `with_callbacks'
    carrierwave (0.10.0) lib/carrierwave/uploader/cache.rb:122:in `cache!'
    carrierwave (0.10.0) lib/carrierwave/mount.rb:329:in `cache'
    carrierwave (0.10.0) lib/carrierwave/mount.rb:163:in `image='
    carrierwave (0.10.0) lib/carrierwave/orm/activerecord.rb:39:in `image='
    activerecord (4.2.4) lib/active_record/attribute_assignment.rb:54:in `public_send'
    activerecord (4.2.4) lib/active_record/attribute_assignment.rb:54:in `_assign_attribute'
    activerecord (4.2.4) lib/active_record/attribute_assignment.rb:41:in `block in assign_attributes'
    actionpack (4.2.4) lib/action_controller/metal/strong_parameters.rb:185:in `each_pair'
    actionpack (4.2.4) lib/action_controller/metal/strong_parameters.rb:185:in `each_pair'
    activerecord (4.2.4) lib/active_record/attribute_assignment.rb:35:in `assign_attributes'
    activerecord (4.2.4) lib/active_record/nested_attributes.rb:513:in `assign_to_or_mark_for_destruction'
    activerecord (4.2.4) lib/active_record/nested_attributes.rb:479:in `block in assign_nested_attributes_for_collection_association'
    activerecord (4.2.4) lib/active_record/nested_attributes.rb:460:in `each'
  </code></pre>
  
  <p>Have been working on this for the last two days . Any help would be appreciated.</p>