0

I am trying to integrate the following gem: https://rubygems.org/gems/jquery.fileupload-rails but it became a mission impossible. I am trying for last two days and it simply doesn't want to load jquery.fileupload-rails javascript.

I tried this tutorials:

railscasts.com/episodes/381-jquery-file-upload?view=asciicast 5minutenpause.com/blog/2013/09/04/multiple-file-upload-with-jquery-rails-4-and-paperclip/

This is my application.js:

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= jquery.fileupload/basic
//= require turbolinks
//= require_tree .

Gemfile.lock:

jquery-rails (3.1.2)
jquery-ui-rails (5.0.2)
jquery.fileupload-rails (1.11.0)

I have tried many combinations and it doesn't work. How to make it work?

2
  • 1
    The gem they're using in your 2nd example is jquery-fileupload-rails, not jquery.fileupload-rails. There is no basic.js in the gem you installed, so you probably can't require it. Commented Oct 28, 2014 at 3:28
  • Try following the instructions at the gem you have installed, at this link. Commented Oct 28, 2014 at 3:31

1 Answer 1

1

Add a line to your Gemfile.

gem 'jquery.fileupload-rails'

Now you can require the javascript library in application.js:

//= require jquery.fileupload

doc

demo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.