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 <the.leo...@gmail.com>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 datamapper@googlegroups.com.
> To unsubscribe from this group, send email to
> datamapper+unsubscr...@googlegroups.com.
> 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 post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to