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

**URL:** <https://discuss.rubyonrails.org/t/why-does-script-server-production-use-my-development-db/8316>\
**Category:** rubyonrails-talk\
**Created:** [February 7, 2007, 4:06am UTC](https://discuss.rubyonrails.org/t/why-does-script-server-production-use-my-development-db/8316 "2007-02-07T04:06:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phillip\_rhodes](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@phillip\_rhodes](https://discuss.rubyonrails.org/u/phillip_rhodes)\
**Post date:** [February 7, 2007, 4:06am UTC](https://discuss.rubyonrails.org/t/why-does-script-server-production-use-my-development-db/8316/1 "2007-02-07T04:06:06Z")

</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:** ![Dan\_Manges1](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@Dan\_Manges1](https://discuss.rubyonrails.org/u/Dan_Manges1)\
**Post date:** [February 7, 2007, 3:00pm UTC](https://discuss.rubyonrails.org/t/why-does-script-server-production-use-my-development-db/8316/2 "2007-02-07T15:00:19Z")

</div>

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

Dan Manges
