# Why does script/server production use my development db?

**URL:** <https://www.ruby-forum.com/t/why-does-script-server-production-use-my-development-db/84712>\
**Category:** Rails\
**Created:** [February 7, 2007, 5:08am UTC](https://www.ruby-forum.com/t/why-does-script-server-production-use-my-development-db/84712 "2007-02-07T05:08:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phillip\_rhodes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c5a1d2/32.png) [@phillip\_rhodes](https://www.ruby-forum.com/u/phillip_rhodes)\
**Post date:** [February 7, 2007, 5:08am UTC](https://www.ruby-forum.com/t/why-does-script-server-production-use-my-development-db/84712/1 "2007-02-07T05:08:46Z")

</div>

I have a rails app (Radiant CMS) that I installed. I setup the db for  
the production instance of the database (script/setup-database  
production)

I started the application as “script/server production” but the  
application errors out with a table not found error. The application  
was pointed to the development db instance. I thought that  
“script/server production” would use the production db, and  
“script/server development” would run against the development db  
instance and so on.

Anyway, I got around this by setting up the development instance of the  
db (script/setup-database development), but I am confused why running  
“script/server production” would use a development environment.

Thanks for answering a beginners question.  
Phillip

---

<div class="post-metadata">

**Author:** ![phillip\_rhodes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c5a1d2/32.png) [@phillip\_rhodes](https://www.ruby-forum.com/u/phillip_rhodes)\
**Post date:** [February 7, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/why-does-script-server-production-use-my-development-db/84712/2 "2007-02-07T16:00:52Z")

</div>

On Feb 6, 11:06 pm, phillip rhodes [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I started the application as “script/server production” but the  
> application errors out with a table not found error. The application  
> was pointed to the development db instance. I thought that  
> “script/server production” would use the production db, and  
> “script/server development” would run against the development db  
> instance and so on.

To set the environment use:  
script/server -e production

Dan M.
