# How to set a ror application environment for production?

**URL:** <https://www.ruby-forum.com/t/how-to-set-a-ror-application-environment-for-production/123806>\
**Category:** Deployment\
**Created:** [December 20, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/how-to-set-a-ror-application-environment-for-production/123806 "2007-12-20T20:32:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![art](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8797f3/32.png) [@art](https://www.ruby-forum.com/u/art)\
**Post date:** [December 20, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/how-to-set-a-ror-application-environment-for-production/123806/1 "2007-12-20T20:32:06Z")

</div>

Hi all,

I would like to know how to set the production environment in a ruby on  
rails application in the real server?

Thanks in advance and best regards,

Art

---

<div class="post-metadata">

**Author:** ![art](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8797f3/32.png) [@art](https://www.ruby-forum.com/u/art)\
**Post date:** [December 22, 2007, 1:06am UTC](https://www.ruby-forum.com/t/how-to-set-a-ror-application-environment-for-production/123806/2 "2007-12-22T01:06:32Z")

</div>

Hey Art,

assuming you have configured database.yml, you can simply start e.g.  
rails in mongrel using

mongrel\_rails start -e production -p 80

That’s it, you’re rails server listens on port 80 and runs in  
production mode. If you want to actually deploy it on a real server I  
would recommend “hiding” mongrel behind apache, lighttpd etc. using  
using apache et al as proxy. Simply google for “apache rails” or start  
with  
[http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/](http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/)  
for a start.

Best

Timo

---

<div class="post-metadata">

**Author:** ![art](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8797f3/32.png) [@art](https://www.ruby-forum.com/u/art)\
**Post date:** [December 20, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/how-to-set-a-ror-application-environment-for-production/123806/3 "2007-12-20T21:58:37Z")

</div>

In other words I would like to switch from development mode to  
production mode.

Thanks again in advance.
