# Production Mode.. One liner question

**URL:** <https://www.ruby-forum.com/t/production-mode-one-liner-question/185339>\
**Category:** Rails\
**Created:** [March 18, 2010, 1:00pm UTC](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339 "2010-03-18T13:00:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 18, 2010, 1:00pm UTC](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339/1 "2010-03-18T13:00:19Z")

</div>

Hello Champs,

Just a one liner question. I have written a script to put data into  
production database. Where to execute that script ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 18, 2010, 1:28pm UTC](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339/2 "2010-03-18T13:28:07Z")

</div>

On Thu, Mar 18, 2010 at 1:00 PM, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Just a one liner question. I have written a script to put data into  
> production database. Where to execute that script ?

For scripts sometimes I create a bin directory. Those are run with  
script/runner.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 19, 2010, 6:57am UTC](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339/3 "2010-03-19T06:57:07Z")

</div>

Resolved…  
We have to pass a RAILS\_ENV variable at command line before ruby  
script/runner…

Cheers …

Xavier N. wrote:

> On Thu, Mar 18, 2010 at 1:00 PM, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Just a one liner question. I have written a script to put data into  
> > production database. Where to execute that script ?
> 
> For scripts sometimes I create a bin directory. Those are run with  
> script/runner.
