How do i prevent emacs from adding coding information in the first line?

It looks like this is part of the ruby-mode in emacs.

I found a link to an article that shows how to edit the ruby-mode.el file. Not sure if it works, but there is also a comment on that article that may work better:

(setq ruby-insert-encoding-magic-comment nil)

If instead of using ruby-mode your are using enh-ruby-mode you should set this variable:

(setq enh-ruby-add-encoding-comment-on-save nil)

Links:

Fix: Emacs/Aquamacs keeps adding encoding comments to my files

Also, semi-related question but pertinent answer by Michael Kohl: How can I avoid putting the magic encoding comment on top of every UTF-8 file in Ruby 1.9?

Enh-ruby-mode comment encoding line

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)