From: John Joyce Date: 2007-08-01T11:59:49+09:00 Subject: Re: Railless ActiveRecord Rails uses something called migrations. A migration is a Ruby file that changes the database schema. It is basically a Ruby transliteration of SQL and can include SQL for things ActiveRecord doesn't support directly. I haven't yet used AR outside of Rails (but want to!) Rails includes Rake (Ruby make) tasks specifically for running migrations or removing them. Migrations can be done incrementally. You can also use the Rails console to fiddle with the db via activerecord, but I don't know if you can access the Rails console (basically it is irb on Rails crack) outside of a Rails setting. If you get stuck with AR look at api.rubyonrails.com it is the docs for all of Rails, but ActiveRecord is a big part of that. And do pick up the AWDWR book because a large chunk of it is all about Active Record and is really useful as a reference. On Jul 31, 2007, at 9:37 PM, Ari Brown wrote: > Hey all. More ActiveRecord trouble. > > So I have my ActiveRecord connection. All is good. I am connecting > to an SQLite3 database, which is working out pretty well for me. I > think. > > So my story is this: When I tried to use the table "characters", > abstracted from class Character, I get an error: > `table_structure': ActiveRecord::StatementInvalid > (ActiveRecord::StatementInvalid) > > I did some poking around and actually read the error message, and > I'm getting this error because there is no table characters (right??) > So how do I create these tables in ActiveRecord? > > > Thanks, > aRi > --------------------------------------------| > If you're not living on the edge, > then you're just wasting space. > > >