SQLite3 Error Transitioning to 2.0

I’m transitioning to Rails 2.0. Under 2.0 setting up a database
appears to be even easier than it was under 1.x. In fact, it appears
to be almost trivial. So, I’m wondering why I am having trouble. I’m
using the default SQLite3. I setup my database with:

./script/generate scaffold Access login:string password:string
start_date:date email:string

It runs. What could be easier? However, when I go to access the
‘access’ controller I get:

SQLite3::SQLException: no such table: accesses: SELECT * FROM
“accesses”

There appears to be no ‘accesses’ table in the database. I guess I
must have omitted something; but, I don’t know what it could be. If
someone could offer a clue it would be most appreciated.

Thanks for any input.

    ...  doug

Sounds stupid but did you run the migration file?

Aurélien Bottazini
http://www.mycashgarden.com

Sounds stupid but did you run the migration file?

I’m the stupid one! :slight_smile: No, I didn’t. I guess I just got so caught up
in this thing that I actually was thinking that EVERYTHING was
handled. I’m an idiot. Thanks.

     ... doug

I would check over your migrations to make sure that there is
something creating the table you are looking for.

Sounds stupid but did you run the migration file?

This has been a real comedy of errors for me. First, I stupidly
forget to do the migration. Aurélien points my mistake out to me and
I ASSUME that has to be it. However, the reality is that even after
running the migration (during which it specifically reports creating
the accesses table), I still get the same error. Does anyone have any
thoughts or have I managed to get everyone completely confused at this
point.

Thanks for any input.

    ... doug

I would check over your migrations to make sure that there is
something creating the table you are looking for.

Good suggestion. I think that I have this thing figured out. It’s
likely more of a misunderstanding on my part than anything else. I
was using the test environment. The database itself got created in
both the test environment and the development environment. However,
for whatever reason, the table was added only to the development
environment. So, when I switched to the development environment it
worked perfectly.

I’m not quite sure why it is that when I was working in the test
environment the table got added to the development environment
database. I’m sure there is an explanation. If someone would like
to share it with me, I’d love to hear it.

Thanks for all the input.

    ... doug