文章列表
#database.yml
adapter: mysql
database: mytest
username: username
password: password
#------------------------------------
#conn.rb
#encoding:utf-8
require 'rubygems'
require 'active_record'
require 'yaml'
require 'logger'
dbconfig = YAML::load(File.open('database.yml'))
puts ...