From: Jamis Buck Date: 2005-10-04T06:02:41+09:00 Subject: Re: ActiveRecord and FXRuby.. On Oct 3, 2005, at 2:50 PM, Mark Cotner wrote: > The Pragmatic RoR book explains in detail how to do this. It > mostly just > involves passing in your DB config to ActiveRecord instead of > having it in > the RoR ./config dir. > > Someone please correct me if I've misspoken as I have not yet > attempted > actually doing this. Nope, you're exactly right, Mark. require 'active_record' ActiveRecord::Base.establish_connection( :adapter => "mysql", :host => "localhost", :username => "me", :password => "password" ) And then define your classes and away you go. It's pretty straightforward. - Jamis > > The book's not in front of me right now, I'll try and paste an > example later > after I check it out. > > 'njoy, > Mark > > > On 10/3/05 3:59 PM, "Lyle Johnson" wrote: > > >> On 10/3/05, Graham Foster wrote: >> >> >>> Is there any reason why I can't use ActiveRecord to help build a >>> client >>> based app with FXRuby? If I'm understanding all this MVC stuff >>> correctly, >>> then I'd just be using the M bit in another app. Seems like it >>> would save >>> me a shed-load of work >>> True? >>> >> >> ActiveRecord is the ORM layer used by Rails, right? I don't think >> there's any technical reason why this wouldn't work, although I don't >> know that anyone's actually tried that yet. At any rate, I'd >> appreciate hearing about your experience with it (especially if you >> run into any conflicts between FXRuby and ActiveRecord). >> >> > > > >