I'm new to the Asset Pipeline, having just migrated over from Rails 3.0. I'm trying to get CKEditor into the pipeline, but all the gems for it are really unclear about how they work, and have little or no usage instructions.
I would prefer to do this without using a gem, since it seems that all I have to do is drop the source files into the vendor/assets
directory and then include them in application.js
. I've tried that, however, when I precompile and push to production, it seems that some of the files aren't being found (editor.css
, for example), and the editor doesn't show up at all (just blank area).
application.js
//= require jquery
//= require jquery_ujs
//= require ckeditor/ckeditor
//= require_self
That's with the source files in vendor/assets/javascript/ckeditor/
, and is pointing to ckeditor.js
. I'm just not sure where to go from here. This code works fine in development but does not work in production. I am running rake assets:precompile
before adding and committing to git, and then pushing to heroku.
I got this working (deployed on Heroku), by:
config.assets.precompile += ['ckeditor/*']
to my production.rbvar CKEDITOR_BASEPATH = '/assets/ckeditor/';
before the include of the application.js//= require ckeditor/ckeditor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With