I have a Rails app with some basic models. The website displays data retrieved from other sources. So I need to write a Ruby script that creates new instances in my database. I
You can open a connection in your scripts as such:
ActiveRecord::Base.establish_connection( :adapter => "mysql", :username => "root", :host => "localhost", :password => "******", :database => "******" )
I'm sure there is a more elegant way to do it, so that it grabs the info from your database.yml.