# Differences between console \[development\] and console test?

**URL:** <https://www.ruby-forum.com/t/differences-between-console-development-and-console-test/167544>\
**Category:** Rails\
**Created:** [May 9, 2009, 6:37am UTC](https://www.ruby-forum.com/t/differences-between-console-development-and-console-test/167544 "2009-05-09T06:37:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [May 9, 2009, 6:37am UTC](https://www.ruby-forum.com/t/differences-between-console-development-and-console-test/167544/1 "2009-05-09T06:37:08Z")

</div>

One of my model code methods is throwing an error when run using  
script/console in test but not in development.

I’d be grateful if someone can tell me the differences between the  
two, beyond the database that they connect to.

Thanks.

---

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [May 9, 2009, 9:49am UTC](https://www.ruby-forum.com/t/differences-between-console-development-and-console-test/167544/2 "2009-05-09T09:49:02Z")

</div>

I think all the differences are the differences between the settings in  
test.rb and development.rb in config/environment/ plus those in  
database.yml.

2009/5/9 Lee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [May 9, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/differences-between-console-development-and-console-test/167544/3 "2009-05-09T17:43:55Z")

</div>

A stack trace for the error will help out quite a bit. The most  
notable difference between the two environments is that the test  
environment has cache\_classes = true, which triggers preloading of the  
application classes on startup. But again, without a stack trace, it’s  
hard to tell.

–Matt J.
