# SQLite3 Error Transitioning to 2.0

**URL:** <https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814>\
**Category:** Rails\
**Created:** [June 18, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814 "2008-06-18T21:10:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 18, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/1 "2008-06-18T21:10:33Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 18, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/2 "2008-06-18T21:15:21Z")

</div>

Sounds stupid but did you run the migration file?

_AurÃ©lien Bottazini_  
[http://www.mycashgarden.com](http://www.mycashgarden.com)

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 18, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/3 "2008-06-18T21:42:03Z")

</div>

> Sounds stupid but did you run the migration file?

I’m the stupid one! 🙂 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
```

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 19, 2008, 4:03am UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/4 "2008-06-19T04:03:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 19, 2008, 1:48am UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/5 "2008-06-19T01:48:35Z")

</div>

> 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
```

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [June 19, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814/6 "2008-06-19T17:49:41Z")

</div>

> 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
```
