I have deployed a rails application (using rails 3.2.3. ruby 1.9.2), it’s up and running and everything is working. Then I tried to manage it using rails console, as vmc rails-console myapp. The console can be connected but when I issue a command like User.count I get the following error:
User.count(0.3ms) SELECT COUNT(*) FROM `users`
ActiveRecord::StatementInvalid: Mysql2::Error:
MySQL server has gone away: SELECT COUNT(*) FROM `users`
It seems that the console can not access the database but caldecott is up and running and is bound to the mysql service according to vmc apps.
Anyone has ideas on that?
this is something we are currently looking to resolve. In the interim, you can have ActiveRecord re-establish the connection by calling establish_connection on the Base class;
Dan