在调用
http://localhost:3000/tempbizs
我有 tempbiz_controller 的索引方法将数据从旧数据库(sqlite3)迁移到我的 rails 应用程序中的另一个 postgresql。
它插入了几条记录。但是我看到它引发了以下错误,该错误显示在我的浏览器上:
ActiveRecord::StatementInvalid in TempbizsController#index
PG::Error: ERROR: invalid byte sequence for encoding "UTF8": 0xca5a
: INSERT INTO "tempbizs" ("BusinessName", "BusinessSubType", "BusinessTradeName",
"BusinessType", "City", "Country", "House", "Latitude", "LocalArea", "Longitude",
"ZIP", "State", "Street", "Unit", "UnitType", "created_at", "updated_at")
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)
RETURNING "id"
我要插入的数据是:RonZalkoTotal Body Fitness & Yoga