From: Junkone Date: 2008-08-12T02:42:40+09:00 Subject: Re: How easy is using ActiveRecord in a non RoR application? On Aug 11, 1:30 pm, Iņaki Baz Castillo wrote: > Hi, I plan to use ActiveRecord in a non RubyOnRails application (just pure > Ruby app). How easy is it? is just loading the library? > > -- > Iņaki Baz Castillo easy. i use activerecord in my db operations as i dont have to break my head for sql operations. u just create a model class and requrie it and use it just as u would do in rails. require 'active_record' ActiveRecord::Base.establish_connection( :adapter => "mysql", :host => "localhost", :database => "mydb", :username => "root" ) class Tag < ActiveRecord::Base set_table_name "tags" has_and_belongs_to_many :trades end