2007/01/17

self.memory.get_chapter(:ferret).mark!

Some private projects were keeping my quiet busy in the last weeks. One issue which was absorbing some of my time was the ruby port of lucene: ferret. To be specific it was not even ferret itself. It was my ignorance. But I am smarter now.
I had problems with our swiss special character set. If trying to save an entry in rails I always the same error:

Exception (: Error occured at :704
Error: exception 2 not handled: Error decoding input string.


Yes. That one was quiet obvious. There had to be a problem with my locales. Well, unfortunately I was searching in the wrong corners and my first solution was setting the locales in my rails environment so I added

ENV['LANG'] = 'de_DE.UTF-8'

to my environment.rb. But nothing changed. Still the same error. Okay, lets ask one of my close friends: Googlix. He revealed that maybe another addition in my environment file would work:

$KCODE = 'u'
require 'jcode'


Okay. But nope. That wasn't it either. I should have taken a nap. I should have put myself an hour in my samadhi tank. (If I only had one of those!).
Finally I decided that the Issue must be not one of my rails setup instead I got suspicious about my operating system. Maybe I misconfigured it. Okay so fire some configuration up:

dpkg-reconfigure locales

Hell no! I didn't have the corresponding package installed for 'de_DE.UTF-8'!! I must have been asleep while setting up my new debian sarge. Well, don't blame yourself. Just don't make the same mistake twice!

No comments: