I need to write a standalone ruby script that is supposed to deal with database. I used code given below in rails 3
@connection = ActiveRecord::Base.establis
Maybe try this:
ActiveRecord::Base.establish_connection(...) ActiveRecord::Base.connection.execute(...)