PerfectlyNormal / tinymce-rails-imageupload

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

Conflict with turbo assets? #25

Closed keichan34 closed 11 years ago

keichan34 commented 11 years ago

I'm getting errors when deploying with capistrano and Rails3 turbo assets.. Can others reproduce this? The error I'm getting is:

 ** [out :: server] mkdir -p /u/apps/my_app/releases/20130305005446/public/assets
 ** [out :: server] 
 ** [out :: server] cp -r /u/apps/my_app/shared/bundle/ruby/1.9.1/gems/tinymce-rails-langs-0.1/vendor/assets/javascripts/tinymce /u/apps/my_app/releases/20130305005446/public/assets
 ** [out :: server] 
 ** [out :: server] mkdir -p /u/apps/my_app/releases/20130305005446/public/assets
 ** [out :: server] 
 ** [out :: server] cp -r /u/apps/my_app/shared/bundle/ruby/1.9.1/gems/tinymce-rails-imageupload-3.5.6.4/vendor/assets/javascripts/tinymce /u/apps/my_app/releases/20130305005446/public/assets
 ** [out :: server] 
 ** [out :: server] rake aborted!
 ** [out :: server] No such file or directory - /u/apps/my_app/releases/20130305005446/public/assets/tinymce/plugins/uploadimage/dialog-9cc16c48c2557a1254ec709a21ea5780.html

Removing rails3 turbo assets from the gemfile seems to fix the error (and removing this gem also seems to solve the error)

PerfectlyNormal commented 11 years ago

Hi. Sorry for the late reply.

I'm not getting any error like that, and I'm using the Rails3 turbo assets gem as well. Have you tried updating that gem?

I have placed the imageupload gem outside the assets group, but can't remember exactly why. Have you tried that?

PerfectlyNormal commented 11 years ago

Encountered the same issue (or similar) when updating to Rails 3.2.13. Looked at how the tinymce-rails does things now, and tried using their system. Put my attempted fix in the asset_trouble branch. Had to precompile twice on my dev-machine, but the staging server picked it up perfectly the first time.

Use something like this in the Gemfile:

gem 'tinymce-rails-imageupload', '~> 3.5.8.3', github: "PerfectlyNormal/tinymce-rails-imageupload", branch: "asset_trouble"

Does the same error still happen with this? Anyone else able to reproduce with/without those changes?