incompatible character encodings: ASCII-8BIT and UTF-8 in Ruby 1.9.2

    incompatible character encodings problem is due to two three reasons first of all check if you are using mysql2 gem

    if not then gem 'mysql2' in your gem file run bundle install and change the adapter to mysql2 in database.yml file.

    it this doesn't work then you can specify default encoding in config/environments.rb file

    Encoding.default_external = Encoding::UTF_8
    Encoding.default_internal = Encoding::UTF_8

    before Application.initialize statement

    5
    Average: 5 (1 vote)