You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

environment.rb 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Be sure to restart your web server when you modify this file.
  2. # Uncomment below to force Rails into production mode when
  3. # you don't control web/app server and can't set it the proper way
  4. # ENV['RAILS_ENV'] ||= 'production'
  5. # Bootstrap the Rails environment, frameworks, and default configuration
  6. require File.join(File.dirname(__FILE__), 'boot')
  7. if RUBY_VERSION >= '1.9' && defined?(Rails) && Rails::VERSION::MAJOR < 3
  8. Encoding.default_external = 'UTF-8'
  9. end
  10. # Load Engine plugin if available
  11. begin
  12. require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
  13. rescue LoadError
  14. # Not available
  15. end
  16. Rails::Initializer.run do |config|
  17. # Settings in config/environments/* take precedence those specified here
  18. # Skip frameworks you're not going to use
  19. # config.frameworks -= [ :action_web_service, :action_mailer ]
  20. # Add additional load paths for sweepers
  21. config.autoload_paths += %W( #{RAILS_ROOT}/app/sweepers )
  22. # Force all environments to use the same logger level
  23. # (by default production uses :info, the others :debug)
  24. # config.log_level = :debug
  25. # Enable page/fragment caching by setting a file-based store
  26. # (remember to create the caching directory and make it readable to the application)
  27. # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
  28. # Activate observers that should always be running
  29. # config.active_record.observers = :cacher, :garbage_collector
  30. config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer
  31. # Make Active Record use UTC-base instead of local time
  32. # config.active_record.default_timezone = :utc
  33. # Use Active Record's schema dumper instead of SQL when creating the test database
  34. # (enables use of different database adapters for development and test environments)
  35. # config.active_record.schema_format = :ruby
  36. # Deliveries are disabled by default. Do NOT modify this section.
  37. # Define your email configuration in configuration.yml instead.
  38. # It will automatically turn deliveries on
  39. config.action_mailer.perform_deliveries = false
  40. # Load any local configuration that is kept out of source control
  41. # (e.g. gems, patches).
  42. if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
  43. instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
  44. end
  45. end