Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route matches [GET] "...cloudinary-jquery-file-upload.js.map" #199

Closed
benbartling opened this issue Apr 22, 2016 · 10 comments
Closed

No route matches [GET] "...cloudinary-jquery-file-upload.js.map" #199

benbartling opened this issue Apr 22, 2016 · 10 comments
Assignees

Comments

@benbartling
Copy link

I'm using version 1.1.6 and I'm getting the following error when including the cloudinary JS via assets pipeline:

ActionController::RoutingError (No route matches [GET] "/assets/cloudinary/cloudinary-jquery-file-upload.js.map")

This is causing the direct upload functionality to break.

@elCorsaiR
Copy link

I'm having the same error last days.

@djjimba
Copy link

djjimba commented Apr 27, 2016

I get the same error but I'm getting away with using
gem 'cloudinary', '1.1.0'
which is not broken.

@elCorsaiR
Copy link

elCorsaiR commented Apr 28, 2016

My problem was that I used fileupload to init:

$(".cloudinary-fileupload").fileupload
      dropZone: "#photos"`

Solution:
$(".cloudinary-fileupload").cloudinary_fileupload

@blimey85
Copy link

Typically what causes this is the main .js file including a call to the .map file. My functionality still works fine however I'm seeing the error all over in my logs.

@trautwein
Copy link

Same problem here. The issue seems to have been introduced in version 1.1.3.

Uploads don't work in any version from 1.1.3 to the current 1.1.6. I haven't been able to track it down to anything specific except for the aforementioned ActionController::RoutingError (No route matches [GET] "/assets/cloudinary/cloudinary-jquery-file-upload.js.map").

@tocker
Copy link
Contributor

tocker commented Jun 1, 2016

The issue is a result of a change to Cloudinary's JavaScript library. Due to compatibility issues with some environments, the script no longer autonomously calls cloudinary_fileupload(). Instead you have to call it explicitly.

BTW cloudinary_fileupload() internally calls Blueimp's fileupload() so there's no need to call both.

Sorry for the unintentional outcome. We will update the documentation to reflect this change.

@tocker tocker self-assigned this Jun 1, 2016
@blimey85
Copy link

blimey85 commented Jun 1, 2016

How do we resolve the .map file not being included and thus causing the log to be flooded with routing errors? I saw at the bottom of the .js file where it's linking to the .js.map file but no idea how to override that.

tocker pushed a commit to cloudinary/cloudinary_js that referenced this issue Jun 5, 2016
cloudinary/cloudinary_gem#199.

Build `js/jquery.cloudinary.js` by renaming `cloudinary-jquery-file-upload.coffee` and then compiling it instead of renaming `cloudinary-jquery-file-upload.js` after compiling
@tocker
Copy link
Contributor

tocker commented Jun 6, 2016

TL;DR

Fixed in version 1.1.7. Please let us know if it solved your problem.

Details

The issue was with the Cloudinary JavaScript library.The GEM fetches the js folder in that library for backward compatibility reasons. The cloudinary-jquery-file-upload.js file was renamed to jquery.cloudinary.js. However the comment added by the compiler pointed to a map file that was not included in the Gem. The Fix was to rename the source cloudinary-jquery-file-upload.coffee to jquery.cloudinary.coffee and only then compile it. The source and map files were added to the gem.

@trautwein
Copy link

@tocker Works for us, thanks!

@blimey85
Copy link

blimey85 commented Jun 6, 2016

@tocker great work! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants