Topic: Integrating plupload with Ruby on Rails 3

Hi guys I am having some trouble with integrating plupload with Ruby on Rails 3. The plupload queue is showing up in the screen when I try to add files and upload the same I get the 500 internal server error template missing.. Here is  my code

<!-- The form_for...remote=>true ensures that the csrf meta tag is carried thru to save
the authenticity token. Without this, authentication gets dropped with an ajax call and
strange things happen, lost authenticity + possible fall thru logic to next GET action. 
Also see the setting in development.rb environment. New as of 3.2.3 -->

<%= form_for [@gallery, @photo], :remote => true do %>

    <h1>Upload Gallery Photos:    <%= @gallery.name %></h1>
    <br>
    <p>For multiple file uploading, I used the simplest version of the Jquery-File-Upload plugin. There are no bells and whistles here. First, you'll want to browse and select your file(s), Then, after clicking "Open"...BAM! The files are uploaded. There is no submit key here (yet). Right now, it's just the  basics, folks. Also, since this is a dev app, your uploaded photo files will go in the Public folder. In real life, you'd probably store them somewhere else, perhaps using Amazon's S3 cloud file storage service.<p>
    <br>
    <p id="notice"><%= notice %></p>

        Upload Photos: 
        <!-- <input id="fileupload" type="file" name="photo[photo_file]" multiple> -->
        <div id="uploader">
            <p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
        </div>
        <script>
        $(function () {                    
            $("#uploader").pluploadQueue({
                // General settings
                runtimes : 'html5,flash,silverlight,html4',
                url : "<%= gallery_photos_path(@gallery.id) %>",
                 // url : "/",
                 
                chunk_size : '1mb',
                rename : true,
                dragdrop: true,
                 
                filters : {
                    // Maximum file size
                    max_file_size : '10mb',
                    // Specify what files to browse for
                    mime_types: [
                        {title : "Image files", extensions : "jpg,gif,png"},
                        {title : "Zip files", extensions : "zip"}
                    ]
                },
         
                // Resize images on clientside if we can
                resize: {
                    width : 200,
                    height : 200,
                    quality : 90,
                    crop: true // crop to exact dimensions
                },
         
         
                // Flash settings
                flash_swf_url : '/plupload/js/Moxie.swf',
             
                // Silverlight settings
                silverlight_xap_url : '/plupload/js/Moxie.xap',

                multipart: true,
                multipart_params: {
                     "authenticity_token" : '<%= form_authenticity_token %>'
                   }
            });
        });        
        </script>

        </br>
        <%= link_to 'Back', galleries_path %> |
        <%= link_to 'Photos Viewer', gallery_photos_path(@gallery) %>
        </br>
    
        <ul id="thumbs" class="cf">
    <!-- json-ajax response here, see fileupload script above, .appendTo css id:"thumbs"-->
        </ul>
<% end %>

error log here

Processing by PhotosController#create as HTML
  Parameters: {"name"=>"Chrysanthemum.jpg", "chunk"=>"0", "chunks"=>"1", "authenticity_token"=>"bXNQt2nIDfn5sORW3zkFIOjZhnUylWxamzEwhdqT6wY=", "file"=>#<ActionDispatch::Http::UploadedFile:0x2dfee08 @original_filename="Chrysanthemum.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"Chrysanthemum.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:C:/Users/om/AppData/Local/Temp/RackMultipart20141025-5620-hluf8q>>, "gallery_id"=>"1"}
  ←[1m←[36mGallery Load (0.0ms)←[0m  ←[1mSELECT "galleries".* FROM "galleries" WHERE "galleries"."id" = ? LIMIT 1←[0m  [["id", "1"]]
  ←[1m←[35m (0.0ms)←[0m  begin transaction
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mINSERT INTO "photos" ("created_at", "gallery_id", "photo_file", "updated_at") VALUES (?, ?, ?, ?)←[0m  [["created_at", Sat, 25 Oct 2014 06:50:19 UTC +00:00], ["gallery_id", 1], ["photo_file", nil], ["updated_at", Sat, 25 Oct 2014 06:50:19 UTC +00:00]]
  ←[1m←[35m (93.6ms)←[0m  commit transaction
Completed 500 Internal Server Error in 94ms

ActionView::MissingTemplate (Missing template photos/create, application/create with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :jbuilder, :coffee]}. Searched in:
  * "C:/samplerailsproject/carrierwave-multi-file-upload/app/views"
):
  actionpack (3.2.3) lib/action_view/path_set.rb:58:in `find'
  actionpack (3.2.3) lib/action_view/lookup_context.rb:109:in `find'
  C:in `find_template'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:34:in `determine_template'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:10:in `render'
  actionpack (3.2.3) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.3) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.3) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.3) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.3) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.3) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  activesupport (3.2.3) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
  activesupport (3.2.3) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.3) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:39:in `render'
  actionpack (3.2.3) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.3) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (3.2.3) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.3) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.3) lib/active_support/callbacks.rb:425:in `_run__790349813__process_action__58198428__callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.3) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
  activerecord (3.2.3) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.3) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.3) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.3) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.3) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.3) lib/journey/router.rb:68:in `block in call'
  journey (1.0.3) lib/journey/router.rb:56:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:600:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  activerecord (3.2.3) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__355906293__call__1004605079__callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
  railties (3.2.3) lib/rails/engine.rb:479:in `call'
  railties (3.2.3) lib/rails/application.rb:220:in `call'
  rack (1.4.1) lib/rack/content_length.rb:14:in `call'
  railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
  rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

Could someone please help me fix this error ?

Thanks
Varun Krishna. P