Rails 3.1 asset pipeline: Ignore backup files from Emacs and other editors -


in rails 3.1 project, if edit app/assets/javascripts/users.js.coffee using emacs, emacs creates backup file named app/assets/javascripts/users.js.coffee~ (note trailing "~").

unfortunately, new rails 3.1 asset pipeline sees .coffee~ file, , injects directly generated application.js, in turn causes javascript errors in browser.

i could turn off backups in emacs writing:

(setq backup-directory-alist nil) 

...or use:

(setq backup-directory-alist `(("." . "~/.emacs-backups"))) 

...to move them directory.

but require every emacs user on project reconfigure emacs, undesirable. prefer configure rails 3.1 ignore files ending in .coffee~. there easy way this?

i thought defect in require_tree method; , sort of is, seems few issues filed on this:

https://github.com/rails/rails/issues/1863#issuecomment-1543809 (rails) https://github.com/sstephenson/sprockets/pull/119 (sprockets) https://github.com/sstephenson/hike/issues/9 (hike, fix made here)

looks fixed recently, after rails rc4 (hike-1.1.0), looks hike-1.2.0 has been released fix, try updating gemfile use newer version


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -