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
2010-04-21 18:00:36
ActiveRecord does cache SQL statements in the development environment
John Topley
2010-04-22 13:40:46
+1
A:
Environments are similar to rails initializers, here's a short list of common differences:
- Dev mode loads the development environment, production loads the production environment. You can find the files/settings for each in
/config/environments/*.rb
. - The development environment is usually set to display rendering information, system information, and RJS errors.
- The development environment will usually have caching disabled.
- 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
2010-04-21 18:01:23
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
2010-04-23 17:51:43