Thank you for your response.
My config is:
configure :production do
DataMapper.setup(:default, {
:adapter => 'postgres',
:encoding => 'UTF8',
:host => 127.0.0.1',
:username => 'user' ,
:password => 'god',
:database => 'prod_db})
end
And I try to set all spellings of UTF8 including Unicode(from postgres
documentation)
And one more: In production I have FreeBSD (7) and as default locale
installed C (ANSI encoding).
четверг, 6 сентября 2012 г., 17:21:01 UTC+4 пользователь Abe Voelker
написал:
>
> Do you have an encoding set in config/database.yml? Try setting it to
> UTF-8 or utf8 (I don't remember which is correct), e.g.
>
> development:
> adapter: postgresql
> encoding: UTF-8
>
> development:
> adapter: postgresql
> encoding: utf8
>
> Also you might want to use the same database in development that you use
> for staging/production. It will save you a lot of headache.
>
> On Thu, Sep 6, 2012 at 7:27 AM, Leonid Batizhevsky
> <[email protected]<javascript:>
> > wrote:
>
>> Hello ereryone.
>>
>> In my sinatra application I use datamapper with postgres and sqlite
>> adapters.
>>
>> I use sqlite in development and every works fine.
>>
>> But then I deploy application and try to use with postgres I\ve got
>> strange errors, like:
>>
>> Encoding Unicode is not a known Ruby encoding for PostgreSQL
>>
>>
>> and
>>
>> incompatible character encodings: ASCII-8BIT and UTF-8
>> (Encoding::Compatibili tyError)
>>
>>
>> Please help me.
>> Thank you
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DataMapper" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/datamapper/-/DN2d8qeMnHAJ.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>.
>> For more options, visit this group at
>> http://groups.google.com/group/datamapper?hl=en.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/datamapper/-/CuUnr-X0i9wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.