1 require_relative "boot"
5 # Require the gems listed in Gemfile, including any gems
6 # you've limited to :test, :development, or :production.
7 Bundler.require(*Rails.groups)
10 class Application < Rails::Application
11 # Initialize configuration defaults for originally generated Rails version.
12 config.load_defaults 7.0
14 # Settings in config/environments/* take precedence over those specified here.
15 # Application configuration can go into files in config/initializers
16 # -- all .rb files in that directory are automatically loaded after loading
17 # the framework and any gems in your application.
19 # Custom directories with classes and modules you want to be autoloadable.
20 config.autoload_paths += %W[#{config.root}/lib]
22 # Use SQL instead of Active Record's schema dumper when creating the database.
23 # This is necessary if your schema can't be completely dumped by the schema dumper,
24 # like if you have constraints or database-specific column types
25 config.active_record.schema_format = :sql unless Settings.status == "database_offline"
27 # Use memcached for caching if required
28 config.cache_store = :mem_cache_store, Settings.memcache_servers, { :namespace => "rails:cache" } if Settings.key?(:memcache_servers)
30 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
31 # the I18n.default_locale when a translation cannot be found).
32 config.i18n.fallbacks = true
34 # Use logstash for logging if required
35 if Settings.key?(:logstash_path)
36 config.logstasher.enabled = true
37 config.logstasher.suppress_app_log = false
38 config.logstasher.logger_path = Settings.logstash_path
39 config.logstasher.log_controller_parameters = true