Forum: Ruby on Rails too long from column

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe B. (Guest)
on 2006-02-27 16:02
hi all
i met a problem:
#---------------------------------------------------------
Mysql::Error: #22001Data too long for column 'content' at row 1: INSERT
INTO bms (`cmd`, `shape`, `content`) VALUES(1, 1,
'ttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestte')
#-----------------------------------------------------------

directly insert into above value to table is works.
but by rails failed
what' going on ?

my table is
+---------+------------------+------+-----+---------+----------------+
| Field   | Type             | Null | Key | Default | Extra          |
+---------+------------------+------+-----+---------+----------------+
| id      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| shape   | tinyint(4)       | NO   |     |         |                |
| cmd     | tinyint(4)       | NO   |     |         |                |
| content | text             | NO   |     |         |                |
+---------+------------------+------+-----+---------+----------------+
This topic is locked and can not be replied to.