vendredi 27 février 2015

Heroku Ruby on Rails app don't updates non-digested assets in public/assets dir

I have Ruby on Rails application on heroku.


We are using ruby 2.1.5



ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]


And Ruby on Rails 4.1.1


Gemfile: http://ift.tt/1awG1mb


Sprockets version (extract from gemfile.lock):



sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)




Of course we are using digested assets


e.g. application-d99ed24f47c5c39b96889148558cb16c.js - THEY are working


Besides that, I am using non-digested assets for CKEditor,


I put them under RAILS_ROOT/public/assets directory


so /assets/ckeditor/config.js should point to RAILS_ROOT/public/assets/ckeditor/config.js




Issue


I can't update assets under public/assets


I updated one file from CKEditor, but it doesn't show the changes either when I:



  • fetch file via CURL

  • look at source in incognito window at chrome (incognito -> 'avoid' caching)


I commited the changes, build on CircleCI passes (continuous integration service). Auto-deploy updates the staging server.


But I still get the old file.


MOREOVER I looked at source of the file using heroku run bash



heroku run bash
cd public/assets/ckeditor
cat config.js


and it RETURNS the old version. Changing this via various tricks e.g. rm cp echo NEW_CONTENT >> NEW_FILE.js also doesn't work.


Heroku returns old version...


PS Moving CKEditor from public/assets/ckeditor to app/assets/ckeditor didn't solve the issue.


Aucun commentaire:

Enregistrer un commentaire