In Ruby, when one tries to access an instance variable directly, which is always private by default, the return value is nil until it has been properly initialized. You can access instance variables using an accessor on a class. In any case, I recommend that you get a copy of “Programming Ruby” or “Programming Ruby 1.9” and read the section on “Scope of Constant and Variables”.
Also I have tested many words from model, and all was false.
for row in @results
if speller.check(row["word"])
...
I have this problen only with russian words, english works fine.
You should have said that from the start :-). This points to an
encoding problem, eg the default encoding used to read your source
file being different from whatever was being used by irb (which may
depend on terminal settings etc).
Anyway, by default Rails will set the encoding to UTF8 (just put
Rails.logger.debug "Kcode: #{$KCODE}" to confirm this is the case for
you). To see what encoding *is* working properly, just check the
$KCODE global from irb. Then set that accordingly in your
environment.rb and restart your app.