Why is "require 'rails/all'" not installed/required in my config/application.rb? -


this curious irritant, why app not include expected line in config/application.rb, or anywhere else?

require 'rails/all'  

this app generated using rails composer in 2014, if makes difference. also, rails 4.2.1.

the issue arose because studying configuring rails applications , the rails initialization process guides have need modify initialization process. both state config/application.rb file expected contain line, mine not. and, yes, app runs fine locally , on heroku, so... why?

my file is:

require file.expand_path('../boot', __file__)  # pick frameworks want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie"  # require gems listed in gemfile, including gems # you've limited :test, :development, or :production. bundler.require(:default, rails.env)  module theappname   class application < rails::application      config.generators |g|        # enable chrome source maps css , js can debugged       #g.sass_options = { :debug_info => true }        # don't generate rspec tests views , helpers       g.test_framework :rspec, fixture: true       g.fixture_replacement :factory_girl, dir: 'spec/factories'        g.view_specs false       g.helper_specs false     end      # rails 4 should include helpers controllers , views     config.action_controller.include_all_helpers = true        # settings in config/environments/* take precedence on specified here.     # application configuration should go files in config/initializers     # -- .rb files in directory automatically loaded.      # set time.zone default specified zone , make active record auto-convert zone.     # run "rake -d time" list of tasks finding time zone names. default utc.     #config.time_zone = 'eastern time (us & canada)'     config.time_zone = 'utc'   # don't use local time or won't notice time issues.      # default locale :en , translations config/locales/*.rb,yml auto loaded.     # config.i18n.load_path += dir[rails.root.join('my', 'locales', '*.{rb,yml}').to_s]     # config.i18n.default_locale = :de      # not check unavailable locales     i18n.enforce_available_locales = false      # not needed @ 4.0     config.assets.initialize_on_precompile = false      # load files in lib     config.autoload_paths += %w(#{config.root}/lib)      # extend rails classes in lib/core_ext/<classname>.rb...  see above?     #config.autoload_paths += dir[file.join(rails.root, "lib", "core_ext", "*.rb")].each {|l| require l }      # 20150711 default date formats     #default_date_formats = { :default => '%d.%m.%y' }     default_date_formats = { :default => '%y.%m.%d' }     time::date_formats.merge!(default_date_formats)     date::date_formats.merge!(default_date_formats)      # 20150808 adding delayed_job queueing daily_report , such     config.active_job.queue_adapter = :delayed_job    end end 

you can require 'rails/all' if suits fancy, parts of rails necessary run application required these lines:

require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" 

if guess motivation this, don't need or want of parts of rails in application, better explicitly require ones want instead of everything. in case if require 'rails/all' end action_view, active_job, , rails/test_unit above. files required can found in railties.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -