On invocation of
http://localhost:3000/tempbizs
Im having the index method of the tempbiz_controller migrate data from a legacy database (sqlite3) to another postgresql inside my rails app.
It has inserted a few records. However I see that it threw the following error which is showing up on my browser:
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"
The data I'm trying to insert is: RonZalkoTotal Body Fitness & Yoga
gVimyou can change the encoding with:encoding UTF-8) and then you'll see what encoding you try to put into the database.