views:

22

answers:

2

What exactly is the difference in rails between dev and prod environments. When I develop an application in dev mode, do I have peformance problems, or others if I clone my dev environment on prod?

+1  A: 

Dev mode won't cache your code, won't cache SQL, it will show you exceptions including your code, no optimizations, etc. Not recommended to distribute it like that, even though you can configure all those under config/environments/development.rb

Zepplock
ActiveRecord does cache SQL statements in the development environment
John Topley
+1  A: 

Environments are similar to rails initializers, here's a short list of common differences:

  1. Dev mode loads the development environment, production loads the production environment. You can find the files/settings for each in /config/environments/*.rb.
  2. The development environment is usually set to display rendering information, system information, and RJS errors.
  3. The development environment will usually have caching disabled.
  4. I'm not sure if this still holds true, but the rails development environment has been known to have issues with memory leaks and should never be used on applications running on machines with production software.

Documentation on settings that can be used within the environment configurations can be found here: http://guides.rubyonrails.org/configuring.html

Damien Wilson
n.b.: when working with a mongrel cluster, the environment is set with a mongrel_ ... yml file. performance of the app increases (felt like that), and most important routing errors are hided with a 404
poseid