-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionView::Template::Error (The asset "favicon/site.webmanifest" is not present in the asset pipeline.) #497
Comments
Please note that this issue is posted on the incorrect Repo. I’m answering this as I ended up here from google first. Delete the Or just comment it out #Rails.application.config.assets.configure do |env|
#mime_type = 'application/manifest+json'
#extensions = ['.webmanifest']
#if Sprockets::VERSION.to_i >= 4
#extensions << '.webmanifest.erb'
#env.register_preprocessor(mime_type, Sprockets::ERBProcessor)
#end
#env.register_mime_type(mime_type, extensions: extensions)
#end |
If you're using Rails 7 you also need to add these two to
|
Rails 7.1.3 on Ubuntu 20.04 LTS, nginx 1.18.0-0ubuntu1.4, libnginx-mod-http-passenger/focal,now 1:6.0.20-1~focal1 amd64 [installed]
web_app_manifest.rb:
Rails.application.config.assets.configure do |env|
mime_type = 'application/manifest+json'
extensions = ['.webmanifest']
if Sprockets::VERSION.to_i >= 4
extensions << '.webmanifest.erb'
env.register_preprocessor(mime_type, Sprockets::ERBProcessor)
end
env.register_mime_type(mime_type, extensions: extensions)
end
Runs ok on local machine with bin/dev, on server
Processing by HighVoltage::PagesController#show as HTML
Parameters: {"id"=>"home"}
Rendered layout layouts/application.html.erb (Duration: 1.0ms | Allocations: 443)
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 762)
ActionView::Template::Error (The asset "favicon/site.webmanifest" is not present in the asset pipeline.
app/views/application/_favicon.html.erb:4
app/views/layouts/application.html.erb:9
_favicon.html.erb:
application.html.erb:
<title>SteadiCamTony</title> <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= render 'application/favicon' %>The text was updated successfully, but these errors were encountered: