RailsApps / rails-bootstrap

Rails 5.1 starter app with the Bootstrap 4 front-end framework.
523 stars 231 forks source link

[Rails 4.1] Sprockets error shows undeclared dependency #16

Closed DanielKehoe closed 10 years ago

DanielKehoe commented 10 years ago

When using Bootstrap with Rails 4.1.0, when visiting any page of the rails-bootstrap example app, I get this error:

Sprockets::Rails::Helper::DependencyError at /
Asset depends on 'bootstrap/glyphicons-halflings-regular.eot' to generate properly but has not declared the dependency
Please add: `//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"` to '/Users/danielkehoe/workspace/wip/rails-devise-pundit/app/assets/stylesheets/framework_and_overrides.css.scss'

This is because sanity checks from the sprockets_better_errors gem have been merged into Rails 4.1. The intent is to reveal asset pipeline errors that you would see in production when you run the app in development mode. See https://github.com/rails/sprockets-rails/pull/96

To resolve this, the rails_layout gem should update the framework_and_overrides.css.scss file to include:

//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"
DanielKehoe commented 10 years ago

This is a duplicate of https://github.com/RailsApps/rails-bootstrap/issues/17

Resolved.