I have a file called application.js under app/assets/javascripts
// = require libs/jquery-retina
// = require libs/jquery.popupoverlay
// = require libs/messg
// = require site_logic/application
// = require serviceworker-companion
// = require i18n
// = require i18n-rules
// = require lazysizes.min
i18n is actually is a gem that I already installed and I don't have any i18n file in the same folder as the application.js file is in and I already saw in the browser that the file was successfully got concatenated to application.js
I wonder how is that possible? because normally the file should be in the same directory.
Sprockets will look through the paths specified in
Rails.application.config.assets.paths
which includesapp/assets
,lib/assets
andvendor/assets
it also includes any paths added by Rails engines.The gems you are using are written as engines, and are mounted when they are required by
Bundler.require(*Rails.groups)
inconfig/application.rb
.See: