# Script/console in development mode?

**URL:** <https://www.ruby-forum.com/t/script-console-in-development-mode/126206>\
**Category:** Rails\
**Created:** [January 16, 2008, 10:25am UTC](https://www.ruby-forum.com/t/script-console-in-development-mode/126206 "2008-01-16T10:25:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [January 16, 2008, 10:25am UTC](https://www.ruby-forum.com/t/script-console-in-development-mode/126206/1 "2008-01-16T10:25:11Z")

</div>

is it script/console in development mode or production mode ?

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [January 16, 2008, 10:46am UTC](https://www.ruby-forum.com/t/script-console-in-development-mode/126206/2 "2008-01-16T10:46:27Z")

</div>

On 16 Jan 2008, at 09:25, Pokkai D. wrote:

> is it script/console in development mode or production mode ?

script/console works out what environment to use in the same way as  
everything else, so by default, script/console will run in development  
mode (as would script/server). But if the RAILS\_ENV environment  
variable is set it will inherit that (or if you pass -e)

Fred

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [January 16, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/script-console-in-development-mode/126206/3 "2008-01-16T16:36:47Z")

</div>

On Jan 16, 2008, at 4:44 AM, Frederick C. wrote:

> On 16 Jan 2008, at 09:25, Pokkai D. wrote:
> 
> > is it script/console in development mode or production mode ?
> 
> script/console works out what environment to use in the same way as  
> everything else, so by default, script/console will run in development  
> mode (as would script/server). But if the RAILS\_ENV environment  
> variable is set it will inherit that (or if you pass -e)
> 
> Fred

There’s no -e on script/console

script/console production

or to force development mode:

script/console development

You can always ask the script for help:

$ script/console -h  
Usage: console [environment] [options]  
-s, --sandbox Rollback database modifications  
on exit.  
–irb=[irb] Invoke a different irb.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid
