spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
815 stars 256 forks source link

Remove the precompile rake tasks #68

Closed rovermicrover closed 12 years ago

rovermicrover commented 12 years ago

And just tell it to precompile the whole file paths. This way it wont break on heroku, or while trying to use an S3 storage system for static assets via asset_sync.

This solves the above issue, but I am unsure if this was really a fix for something I am just not seeing, and if this could just cause other problems.

I hope this helps!

spohlenz commented 12 years ago

The main reason I have tinymce-rails do a static copy from the rake task is due to the (quite large) amount of time it takes to precompile the TinyMCE files, especially given that they already come pre-minimized from upstream.

I use tinymce-rails on Heroku without any problems. I still need to look into the asset_sync issues; however TinyMCE is known to have issues with popups when using a CDN due to cross-domain scripting limitations.

rovermicrover commented 12 years ago

Ah ok so it must have been heroku and asset_sync together that caused the issue.

I need files with hashes to make sure cloudfront isn't serving up an old assets though, but I think if I just add the file paths to config.assets.precompile in my app's production.rb, and then add an option to not enhance the asset precompile in tinymce-rails, all the issues can be resolved with out loosing the advantage of quicker precompile when its applicable.

Does that sound about right?

rovermicrover commented 12 years ago

Nvm my problem was related to something else I added recently failing silently during precompile. It can work with asset_sync fine as long as you add ['tinymce/*', 'tinymce-jquery.js', 'tinymce.js'] to assets.precompile in production.rb. Sorry about the confusion.