Bug #13050
closed
Do not pass paths with /assets to helpers
Added by Daniel Lobato Garcia almost 9 years ago.
Updated over 6 years ago.
Description
Sprockets 3 does not recommend that, and the new option 'config.assets.raise_runtime_errors` on development.rb will raise errors on development when doing it.
We only do it in one stylesheet and a helper, so fixing those let foreman load without these errors.
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Pull request https://github.com/theforeman/foreman/pull/3031 added
Just for the record, if you see error like
Sprockets::Rails::Helper::AssetFilteredError
or
ActionView::Template::Error (Asset filtered out and will not be served: add `Rails.application.config.assets.precompile += %w( patternfly/spinner-lg.gif )` to `config/initializers/assets.rb` and restart your server):
it's likely caused by this bug.
And if you see an error like this, it's also fixed by this PR (https://github.com/theforeman/foreman/pull/3031/files#r49106066 specifically):
/home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.1.5/lib/action_dispatch/middleware/stack.rb:112:in `push': can't modify frozen Array (RuntimeError)
from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.1.5/lib/action_dispatch/middleware/stack.rb:112:in `use'
from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:73:in `block in <top (required)>'
from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:71:in `each'
from /home/dcleal/code/foreman/foreman/config/initializers/assets.rb:71:in `<top (required)>'
(on Rails startup with some plugins enabled)
Edit: filed instead as #13171, because the PR for this ticket was changed and no longer fixes it.
- Category set to Rails
- Translation missing: en.field_release set to 71
- Related to Feature #4629: Add Patternfly support in foreman added
- Related to Refactor #12914: update rails configuration files to match to 4.1 syntax added
- Related to Bug #13096: Make Katello precompile bastion assets added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Related to Feature #13144: Enable assets.raise_runtime_errors in test environment added
Also available in: Atom
PDF