Asset names passed to helpers should not include the "/assets/" prefix
I pulled master and restated my services. When I navigate to pages, I see:
Sprockets::Rails::Helper::AbsoluteAssetPathError - Asset names passed to helpers should not include the "/assets/" prefix. Instead of "/assets/no_avatar.png", use "no_avatar.png":
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:200:in `check_errors_for'
sprockets-rails (2.3.2) lib/sprockets/rails/helper.rb:89:in `asset_path'
actionview (4.1.12) lib/action_view/helpers/asset_url_helper.rb:281:in `image_path'
actionview (4.1.12) lib/action_view/helpers/asset_tag_helper.rb:204:in `image_tag'
app/views/layouts/_page.html.haml:21:in `block in _app_views_layouts__page_html_haml__760526226053833952_70340572907500'
haml (4.0.7) lib/haml/helpers.rb:368:in `block in capture_haml'
haml (4.0.7) lib/haml/helpers.rb:608:in `with_haml_buffer'
haml (4.0.7) lib/haml/helpers.rb:364:in `capture_haml’
I suspect it had to do with the bump in gem versions in cccd269d that we are seeing this issue:
https://github.com/rails/sprockets-rails/issues/167
I think this is mostly an issue that GitLab uses image_path
and image_tag
together. My guess is that the older version of the helpers may have allowed us to get away with this before.
I changed default_avatar
and group_avatar
not to use image_path
, and things seem to work again. We still need to look at whether this affects other things.