You probably got this error message in Ruby on Rails:
/Users/stefan/.../controllers/categories_controller.rb:37: invalid multibyte char (US-ASCII)
The problem is that Ruby 1.9 expects you to use ASCII characters in your source code, and you have used a non ASCII character.
The solution is to tell Ruby that your source file is UTF-8 by including this directive as the first line of your file:
# encoding: utf-8
You probably use UTF-8 for all your files. Once you include a non-ASCII character, the difference between ASCII and UTF-8 becomes relevant for Ruby. That’s when you need this directive.
HELP : linuxmint “katya”+ruby1.9+rails+sqlite3 … the problem is “turkish” characters error like “ı ş ç ö ğ ü ” not display in browser with webrick server… is there any gem for turkish character set ?
you said,
# encoding : utf-8
where i have to add this line?
thanks
sample:
# coding: utf-8
class HeloController < ApplicationController
def index
@mensaje="¡Hola amigo!"
@contador=3
@bono="Este mensaje viene desde el controlador"
end
end
Please use
# encoding: utf-8
not
# coding: utf-8
Saludos
This has to be the first line of the file.