Closed akicho8 closed 11 years ago
tinymce-rails doesn't add the majority of TinyMCE JS or CSS files to the manifest (since they are copied over separately from the normal asset precompilation) which causes Capistrano's cleanup task to consider it unused.
I will look into some options here, most likely adding the files to the manifest. However Sprockets is changing to JSON manifests which complicates things slightly.
For now I'd recommend doing a manual recompile after cleaning up the assets folder.
Same here, thanks
Great gem. Thank you for your work. I unfortunately had to stop using it due to this issue.
What I ended up doing was just copying the TinyMCE files to public/js and changing the "basepath" option in tinymce to /js/tinymce. No copying/compiling required that way on deploys.
I've created a new branch at https://github.com/spohlenz/tinymce-rails/tree/update-manifest which updates the asset manifest when copying the TinyMCE assets over. Could you give it a try and see if it solves the issue?
The update_manifest branch is working nicely with with cap deploy:cleanup
.
There is a related thread at discussing the assets cleanup affect on TinyMCE https://github.com/capistrano/capistrano/issues/353#issuecomment-13973639
@spohlenz the branch https://github.com/spohlenz/tinymce-rails/tree/update-manifest fixes the problem for me. Any plans in merging back and releasing this in the gem?
Thanks!
Thanks @tompesman. It looks like all of the feedback has been positive so far, so there'll probably be a new release in the next day or two.
I've just finished working on Rails 4 support today, so if anyone feels like testing that (same update-manifest branch) it would be greatly appreciated, although I'm not sure if capistrano or asset_sync are supporting it yet.
Hopefully all fixed in the latest gem release 3.5.8.1.
I was no longer removed was tested in ver 3.5.8.1. Thank you.
$ cap deploy:assets:clean_expired
* 2013-03-01 22:34:36 executing `deploy:assets:clean_expired'
* executing "for manifest in /var/www/myapp/releases/*/assets_manifest.yml; do cat -- \"$manifest\" 2> /dev/null && printf ':::' || true; done"
servers: ["localhost"]
[localhost] executing command
command finished in 258ms
** Fetched 2 manifests from /var/www/myapp/releases/*/assets_manifest.yml
** Writing required assets to /var/www/myapp/REQUIRED_ASSETS...
servers: ["localhost"]
** sftp upload #<StringIO:0x007fba9331ca90> -> /var/www/myapp/REQUIRED_ASSETS
[localhost] /var/www/myapp/REQUIRED_ASSETS
[localhost] done
* sftp upload complete
** Removing assets that haven't been deployed for 0 minutes...
* executing "cd -- /var/www/myapp/shared/assets/ && for f in $( find * -mmin +0 -type f | LC_COLLATE=C sort | LC_COLLATE=C comm -23 -- - /var/www/myapp/REQUIRED_ASSETS ); do echo \"Removing unneeded asset: $f\"; rm -f -- \"$f\"; done; rm -f -- /var/www/myapp/REQUIRED_ASSETS"
servers: ["localhost"]
[localhost] executing command
command finished in 231ms
This worked for us. Thanks!
When it's environment capistrano >= 2.14.0, tinymce files will be deleted in deploy:cleanup (assets:deploy:clean_expired). What cause a copy of the tinymce js for that is later than ran deploy:assets:update_asset_mtimes ?
deploy:
cleanup: