title: "no implicit conversion of Symbol into String" carrierwave rails 4
body: <p>Being a newbie in R-O-R, I am trying to add file uploading capability in a web app. I am using rails 4, ruby 3.0 and trying to use carrierwave gem for file upload. I went through an example and that works fine. But when I implement the same code I am getting an issue and not able to figure out where exactly I am making a mistake.</p>
  
  <p>Example I referred to learn <a href="http://richonrails.com/articles/allowing-file-uploads-with-carrierwave" rel="nofollow">http://richonrails.com/articles/allowing-file-uploads-with-carrierwave</a></p>
  
  <p>create view of web app:</p>
  
  <pre><code>&lt;div class="well"&gt; 
    &lt;%= form_for [:admin, @firmware_version], html: { multipart: true } do |f| %&gt; 
    &lt;%= f.label :attachment %&gt; 
    &lt;%= f.file_field :attachment %&gt; 
    &lt;%= f.submit "Save", class: "btn btn-primary" %&gt; 
  &lt;% end %&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Created an uploaded "FirmwareUploader"</p>
  
  <pre><code>class FirmwareUploader &lt; CarrierWave::Uploader::Base
    storage :file
    def store_dir
         "/home/user1/filedownloadtrial"
    end
  end
  </code></pre>
  
  <p>Model is as:</p>
  
  <pre><code>class FirmwareVersion &lt; ActiveRecord::Base
    attr_accessible :hw_supported, :upload_location, :version
    mount_uploader :attachment, FirmwareUploader # Tells rails to use this uploader for this model.
  end
  </code></pre>
  
  <p>My model did not have the column "attachment" so I created a migration for adding a column "attachment" as string. I created this while trying to fix the issue, but it didn't help.</p>
  
  <p>Controller's create action</p>
  
  <pre><code>def create
  @firmware_versions = FirmwareVersion.new(params.require(:firmware_version).permit(:attachment)) 
  
  if @firmware_versions.save
    redirect_to firmware_versions_path, notice: "The firmware_versions has been uploaded."
  else
    render "new"
  end
  </code></pre>
  
  <p>end</p>
  
  <p>So when I select the file to upload and "save" is clicked, I get the following error:</p>
  
  <pre><code>TypeError in Admin::FirmwareVersionsController#create
  no implicit conversion of Symbol into String
  ....
  ....
  This error occurred while loading the following files:
     firmware_version
  </code></pre>
  
  <p>Below is the call stack:</p>
  
  <pre><code>activesupport (3.2.13) lib/active_support/dependencies.rb:251:in `require'
  activesupport (3.2.13) lib/active_support/dependencies.rb:251:in `block in require'
  activesupport (3.2.13) lib/active_support/dependencies.rb:236:in `load_dependency'
  activesupport (3.2.13) lib/active_support/dependencies.rb:251:in `require'
  app/controllers/admin/firmware_versions_controller.rb:50:in `create'
  actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.13) lib/active_support/callbacks.rb:469:in `_run__852872005__process_action__698653545__callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.13) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.13) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.13) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  </code></pre>
  
  <p>I searched but couldn't figure out what's wrong here. </p>