I just installed and set up ferret and act_as_ferret for rails. All of
them at the most recent version. The development environment is running
fine with Mac OS X. But I got problems with the productive environment
(debian).
In the (mysql-)database are few records stored, containig german umlauts
(ü for example). Running a query for “köln” returns the correct record
in dev-environment but NOTHING at the debian system. But the logs are
looking good. It seems the word was correctly submited:
I read a few things here in the forum and elsewhere, but not find any
solution. Would you please give me some pointers? I really get not
through these encoding, locales, collation and stuff.
looking good. It seems the word was correctly submited:
Your system locale should be set to UTF-8. Use the ‘locale’ command
to view the current settings and change the LANG and LC_ALL
environment variables if necessary. (In your case they should
probably be set to “de_DE.UTF-8”)
MySQL should be configured to use UTF-8 as well. You can either
specify the character set for each individual table (via the CREATE
TABLE command) or globally in my.cnf:
looking good. It seems the word was correctly submited:
[…] Your system locale should be set to UTF-8. Use the ‘locale’ command
I recommend to use UTF-8 throughout the whole stack (OS, MySQL,
Rails). That way you’ll get rid of your encoding problems once and
for all.
BIG thanks for that. It was of great help. Now, running the rails web
server Webrick, works with UTF-8. I’ve set the database tables to UTF-8,
locale to de_DE.UTF-8@euro and added the suggested variables in
environment.rb.
The one problem left is, that it still does not work in
production-environment running with apache2 und fcgi. This is rails
specific. But is there anything I forgot to set in the apache-config? I
wonder why it is runnning with webrick but not with apache.
Would you please comment on that? That would be nice.