# ActiveRecord::StatementInvalid in BlogController#index

**URL:** <https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797>\
**Category:** Rails\
**Created:** [April 15, 2008, 8:22am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797 "2008-04-15T08:22:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2008, 8:22am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797/1 "2008-04-15T08:22:08Z")

</div>

Hello. I’m trying to do the video tutorial “how to build a blog engine  
in 15 minutes with ruby on rails” from the main rubyonrails website,  
and I’m getting an error when I try to use scaffold :post after  
editing my config file for the mysql database.

Here is the exact error I’m getting:

ActiveRecord::StatementInvalid in BlogController#index

ActiveRecord::StatementInvalid  
RAILS\_ROOT: ./script/…/config/…

Application Trace | Framework Trace | Full Trace  
Request

Parameters: None

Show session dump

Response

Headers: {“cookie”=\>[], “Cache-Control”=\>“no-cache”}

If anyone can help me I would greatly appreciate it. I’m really  
stumped here.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2008, 8:47am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797/2 "2008-04-15T08:47:53Z")

</div>

Heya

That video is REALLY out of date, so it won’t work - it’s a pre-  
release version of Rails that was being used.

Try out some of my videos… they’re free (for a limited time) 😉

See below!

Julian.

Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)  
VIDEO #4 coming soon!  
[http://sensei.zenunit.com/](http://sensei.zenunit.com/)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2008, 9:10am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797/3 "2008-04-15T09:10:51Z")

</div>

On Apr 15, 7:47 am, Julian L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Heya
> 
> That video is REALLY out of date, so it won’t work - it’s a pre-  
> release version of Rails that was being used.
> 
> Try out some of my videos… they’re free (for a limited time) 😉

Although according to the first video you’re using rails 1.2.4, so  
hardly latest and greatest.

Fred

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797/4 "2008-04-15T17:02:16Z")

</div>

On 15 Apr 2008, at 15:51, dogdayafternoon wrote:

> Unfortunately, neither of these responses helped me or had anything to  
> do with my question.
> 
> Can anyone else be so kind as to give me a hint, I’m stuck here.

You need to tell us more. there should be more to the error in the  
logs (in particular what is the sql statement that was invalid).

Fred

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-in-blogcontroller-index/134797/5 "2008-04-15T16:52:16Z")

</div>

Unfortunately, neither of these responses helped me or had anything to  
do with my question.

Can anyone else be so kind as to give me a hint, I’m stuck here.

On Apr 15, 2:10 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
