# ActiveRecord::StatementInvalid with Production ENV

**URL:** <https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126>\
**Category:** Rails\
**Created:** [December 3, 2006, 12:09am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126 "2006-12-03T00:09:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bolo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Post date:** [December 3, 2006, 12:09am UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126/1 "2006-12-03T00:09:15Z")

</div>

Hello,

I was deploying my application on my server ,when i test my application  
[http://www.expay.uag-histoire.com/faq\_categories](http://www.expay.uag-histoire.com/faq_categories) i can see this error

ActiveRecord::StatementInvalid in Faq categoriesController#index

ActiveRecord::StatementInvalid

Perhaps in my dev environement i don’t have this problem ☹

I don’t really understand where is the problem

Thanks You

---

<div class="post-metadata">

**Author:** ![Bolo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Post date:** [December 4, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126/2 "2006-12-04T18:17:52Z")

</div>

Hi,

2006/11/30, Bolo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I was deploying my application on my server ,when i test my application  
> [http://www.expay.uag-histoire.com/faq\_categories](http://www.expay.uag-histoire.com/faq_categories) i can see this error
> 
> ActiveRecord::StatementInvalid in Faq categoriesController#index
> 
> ActiveRecord::StatementInvalid

It would help if you posted more of the error message. Nonetheless, I  
have had similar problems since upgrading an app to 1.2RC1. My  
problem was a difference in the MySQL server version between my  
development environment vs my production environment. I was using  
4.0.12 in dev, and 5.0.24 in production.

Once I had the same version on dev and production, I could investigate  
the errors, correct them, and deploy anew.

## Hope that helps !

FranÃ§ois Beausoleil  
[http://blog.teksol.info/](http://blog.teksol.info/)  
[http://piston.rubyforge.org/](http://piston.rubyforge.org/)

---

<div class="post-metadata">

**Author:** ![Bolo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Post date:** [December 4, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126/3 "2006-12-04T21:04:58Z")

</div>

Hello Francois,

> t would help if you posted more of the error message.  
> Full message. [Parked at Loopia](http://pastie.caboo.se/25729)

> have had similar problems since upgrading an app to 1.2RC1.  
> Me too

Me i use Sqlite3 for production and dev environement. Do you find a  
solution

---

<div class="post-metadata">

**Author:** ![Bolo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Post date:** [December 4, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126/4 "2006-12-04T21:29:04Z")

</div>

For reference, the problem Bolo was having is detailed  
[http://forums.planetargon.com/forums/3/topics/40?page=1#posts-107](http://forums.planetargon.com/forums/3/topics/40?page=1#posts-107)

Basically, rake migrate wasn’t working quite the way he expected it to,  
so none of his tables existed.

---

<div class="post-metadata">

**Author:** ![Bolo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Post date:** [December 4, 2006, 9:33pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-with-production-env/78126/5 "2006-12-04T21:33:06Z")

</div>

Yes working righ now

Tks
