connection_ninja icon indicating copy to clipboard operation
connection_ninja copied to clipboard

Connection Lost

Open raphaelp opened this issue 15 years ago • 4 comments

I did the following test. A have a Application model that points to a DB using use_connection_ninja. Them, on console I did the following:

Application.connection Application.all ActiveRecord::Base.connection Application.all

On the last command I received: "Mysql::Error: MySQL server has gone away". So, seems that I cant use the default application database. Only those using use_connection_ninja. Is that true?

raphaelp avatar Sep 22 '10 20:09 raphaelp

Can you gist the model code that you are using to connect to your different databases?

cherring avatar Sep 23 '10 02:09 cherring

Is was a very simple test:

class Application < ActiveRecord::Base use_connection_ninja(:config) end

raphaelp avatar Sep 23 '10 03:09 raphaelp

How about your database.yml? can you post that?

cherring avatar Sep 23 '10 08:09 cherring

Could not paste the file here, but you can see it where: http://dl.dropbox.com/u/5350111/database.yml

Thanks

raphaelp avatar Sep 23 '10 11:09 raphaelp