Rails 4.2.1, Ruby 2.2.6, sprockets 3.7.1, sprockets-rails 3.2.0
I am trying to deploy to my staging server with a new .js file and the precompile did nothing. Here is the output with '--trace'.
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
** Invoke ckeditor:nondigest (first_time)
** Invoke environment
** Execute ckeditor:nondigest
I have tried running rake assets:clean, assets:clobber, and assets:precompile with and without 'RAILS_ENV=staging bundle exec' prepended to those commands - nothing. I deleted the assets folder and ran the precompile again - nothing. I have incremented the assets.version - nothing.
I tried putting my assets precompile directive in /config/initializers/assets.rb, /config/environments/staging.rb, and /config/application.rb
Rails.application.config.assets.version = '1.0.2'
Rails.application.config.assets.precompile += %w(
admin.css
admin.js
new_file.js
)
Is there a way to tell what file the assets:precompile is looking in?
* UPDATE *
Setting assets.compile = true and deploying makes the assets precompile. I was under the impression that this directive would make rails serve assets on the fly instead of using the precompiled assets. Is this correct to do?
Rails.application.config.assets.compile = true