December 3rd, 2009, 10:10 PM
Hi, I am trying to set up a Rails app with a MySQL database at the back end. The database.yml connection section looks like this after Rails created it automatically:
When I start up "ruby script/console" and try to save a record with <ClassName>.new, nothing happens in the DB and I get this error message:
I remove the "encoding: utf8" line from database.yml and try to do the same. Then I get this message:
Commands out of sync; you can't run this command now: SET NAMES utf8
So, it looks like Rails is trying to run some MySQL commands. Why is this happening and how to stop these messages?
Commands out of sync; you can't run this command now: SET SQL_AUTO_IS_NULL