Sprockets can't find TinyMCE from gem
-
30-10-2019 - |
Question
I'm using Spree 0.70.3, Rails 3.1.3, and a custom fork of the Spree Editor plugin. (N.B. the relevant code for this fork hasn't changed from master.)
When I request a page which should get TinyMCE on a text area, I see this error in my development log:
Error compiling asset admin/all.js:
Sprockets::FileNotFound: couldn't find file 'tinymce-jquery'
(in <gemset-path>/bundler/gems/spree_editor-48cdfcfaf7bd/app/assets/javascripts/admin/spree_editor.js:9)
The line in question looks like this:
//= require tinymce-jquery
The editor depends on the tinymce-rails
gem, which has a few candidates for the file in question:
assets/vendor/tinymce/jquery-tinymce.js
assets/precompiled/tinymce/jquery.tinymce.js
assets/precompiled/tinymce/tiny_mce_jquery.js
assets/integration/tinymce-jquery.js
The README for that gem says the require line quoted above is correct, however. None of the gem's paths are in Sprockets' search path as shown by putting Rails.application.config.assets.paths
into the console.
Should I be adding the gem's path to the Sprockets search path somehow, or is this something the gem isn't doing correctly?
No correct solution