출처 : http://tmwalker.tistory.com/26


1. config 폴더 -> environment.rb 파일에 $KCODE = 'u'를 추가해준다.
RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
end
$KCODE = 'u'
< environment.rb 파일 끝 부분에 $KCODE = 'u' 추가 >


2. config 폴더 -> database.yml 파일의 각 부분에 encoding=utf8를 추가해준다.
development:
  ....
  encoding: utf8

test:
 ...
 encoding: utf8

production:
  ...
  encoding: utf8
< database.yml 파일에 encoding=utf8 추가 >

3. 뷰 파일 생성시 utf-8 형식으로 만들어준다.
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by 푸헐스