Thank you!When i use command "show create database
<database_name>",the console window show that database's coding
is
"latin1".Later I added line "encoding: utf8"in my
database.yml,remigrated my three migrations,then console window said:
D:\ruby\cashmere>rake db:migrate VERSION=0
(in D:/ruby/cashmere)
== AddTestData: reverting
====================================================== AddTestData: reverted
(0.1400s)
===========================================
== AddPrice: reverting
=======================================================--
remove_column(:products, :price)
-> 0.1870s
== AddPrice: reverted (0.1870s)
==============================================
== CreateProducts: reverting
=================================================-- drop_table(:products)
-> 0.0470s
== CreateProducts: reverted (0.0470s)
========================================
D:\ruby\cashmere>rake db:migrate
(in D:/ruby/cashmere)
== CreateProducts: migrating
=================================================-- create_table(:products)
-> 0.0930s
== CreateProducts: migrated (0.0930s)
========================================
== AddPrice: migrating
=======================================================-- add_column(:products,
:price, :integer, {:default=>0})
-> 0.1250s
== AddPrice: migrated (0.1250s)
==============================================
== AddTestData: migrating
====================================================rake aborted!
Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
(utf8_g
eneral_ci,COERCIBLE) for operation '=': SELECT * FROM products WHERE
(products.t
itle = '白领男') LIMIT 1
This shows mysql setting is not right.How can i manage it?I am a
fresher to mysql.
Michael Wang wrote:> Guo Yangguang wrote:
>> I use Instant Rails 1.7 to develop this project in windows xp. I
>> have attached it.How can i make it to display in chinese when i input
>> "http://localhost:3000/admin/list" in the browser.
>> Thank you!
>>
>> Attachments:
>> http://www.ruby-forum.com/attachment/105/cashmere.rar
>>
>
> See my reply to your other thread here:
>
> http://www.ruby-forum.com/topic/121287#541357
>
>
> --
> Michael Wang
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---