Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 4 (0 open4 closed)

Related to Foreman - Feature #4629: Add Patternfly support in foremanClosedAlon Goldboim03/11/2014Actions
Related to Foreman - Refactor #12914: update rails configuration files to match to 4.1 syntaxClosedOhad Levy12/22/2015Actions
Related to Katello - Bug #13096: Make Katello precompile bastion assetsClosedDaniel Lobato Garcia01/09/2016Actions
Related to Foreman - Feature #13144: Enable assets.raise_runtime_errors in test environmentClosedDominic Cleal01/12/2016Actions
Actions #1

Updated by The Foreman Bot almost 9 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/3031 added
Actions #2

Updated by Marek Hulán almost 9 years ago

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.

Actions #3

Updated by Dominic Cleal almost 9 years ago

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.

Actions #4

Updated by Dominic Cleal almost 9 years ago

  • Category set to Rails
  • Translation missing: en.field_release set to 71
Actions #5

Updated by Dominic Cleal almost 9 years ago

  • Related to Feature #4629: Add Patternfly support in foreman added
Actions #6

Updated by Dominic Cleal almost 9 years ago

  • Related to Refactor #12914: update rails configuration files to match to 4.1 syntax added
Actions #7

Updated by Daniel Lobato Garcia almost 9 years ago

  • Related to Bug #13096: Make Katello precompile bastion assets added
Actions #8

Updated by Daniel Lobato Garcia almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #9

Updated by Dominic Cleal almost 9 years ago

  • Related to Feature #13144: Enable assets.raise_runtime_errors in test environment added
Actions

Also available in: Atom PDF