PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

Not precompiling #5

Closed aaronchi closed 12 years ago

aaronchi commented 12 years ago

I'm not sure if there's something I'm missing, but trying to use this plugin on rails 3.2, the production environment can't find the js files unless I add them explicitly to config.assets.precompile. Are these supposed to be added to the tinymce-rails bundle automatically?

PerfectlyNormal commented 12 years ago

I don't have a Rails 3.2 app handy right now, but I'll take a look and see if I can't figure it out

anguyen-elc commented 12 years ago

@aaronchi How do you make it work? I got same problem, too!

ivliaspiration commented 12 years ago

I solved it with the following app/assets/javascripts/application.js:

//= require jquery
//= require jquery_ujs
//= require tinymce-jquery
//= require tinymce/plugins/uploadimage/editor_plugin.js
//= require tinymce/plugins/uploadimage/langs/en.js
//= require tinymce/plugins/uploadimage/langs/en_dlg.js
//= require_tree .

I'm not an expert in assets pipeline, but I think that there should be some generic js file that has require_tree . for the plugin files. Besides, I see in log that tinymce-rails itsef copies its assets to vendor during precompile (not sure how it is implemented, if I figure it out, I'll make a pull request).

ffloyd commented 12 years ago

I've made a pull request with solution of this problem. https://github.com/PerfectlyNormal/tinymce-rails-imageupload/pull/14