add magic encoding to all files

Signed-off-by: ShiningRay <shiningray.nirvana@gmail.com>
move alias_fallback to gem
RAILS_ENV => Rails.env

Signed-off-by: ShiningRay <shiningray.nirvana@gmail.com>