I'm currently working on a project that's using a package medium-editor-insert-plugin which depends on another package jquery-sortable. Everything appears to run just fine when I'm in a development environment, but when I push to heroku (or any production sort of env, I guess) I'm seeing issues while trying to precompile the assets.
I've narrowed down the issue to jquery-sortable's application.js requiring all sorts of files that don't exist in my project, and therefore causing this error:
$ foreman run rake assets:precompile
rake aborted!
Sprockets::FileNotFound: couldn't find file 'vendor/jquery'
(in /Users/steve/.rvm/gems/ruby-2.1.3/gems/rails-assets-jquery-sortable-0.9.12/app/assets/javascr
ipts/jquery-sortable/application.js:1)
... [long stack trace]
What's weird is that I'm not even aware of where this sortable plugin is being required in from. At no point in my project's application.coffee am I requiring jquery-sortable, as I'm not using the part of medium-editor-insert-plugin where it is required. I'm also not even sure why a javascript library would have //= require in its codebase in the first place...
Any ideas as to what I can do to solve this? Can I somehow exclude jquery-sortable from the pre-compilation process? Any advice would be great.
Hey there,
I'm currently working on a project that's using a package medium-editor-insert-plugin which depends on another package jquery-sortable. Everything appears to run just fine when I'm in a development environment, but when I push to heroku (or any production sort of env, I guess) I'm seeing issues while trying to precompile the assets.
I've narrowed down the issue to jquery-sortable's
application.js
requiring all sorts of files that don't exist in my project, and therefore causing this error:What's weird is that I'm not even aware of where this sortable plugin is being required in from. At no point in my project's
application.coffee
am I requiring jquery-sortable, as I'm not using the part of medium-editor-insert-plugin where it is required. I'm also not even sure why a javascript library would have//= require
in its codebase in the first place...Any ideas as to what I can do to solve this? Can I somehow exclude jquery-sortable from the pre-compilation process? Any advice would be great.
Thanks in advance!