From: Mischa Berger Date: 2009-04-15T14:45:41+09:00 Subject: ActiveRecord without Rails: necessary to close connection? Hello everyone, This is the first time I want to use ActiveRecord outside Rails. This is my (simplified) code: ActiveRecord::Base.establish_connection( :adapter => 'mysql', :host => 'localhost', :username => 'username', :password => 'password', :database => 'database') class Rate < ActiveRecord::Base end r = Rate.find(:first) r.value = new_rate r.save! This works fine, but I was wondering if I have to close any database connections at the end of my script (by using remove_connection??)? Or is does AR take care of this automatically? Thanks in advance. Mischa. -- Posted via http://www.ruby-forum.com/.