I realize there are similar questions that have been answered here, but many of those answers are using gems or modifying Bootstrap's files directly. While those are valid configurations, I want to increase my knowledge set in this area (Sprockets, Rails Pipeline, front-end development in general) and want to understand why this isn't working, what the underlying problem is.
Ruby 2.0.0-p353, Rails 4.0.2, Bootstrap 3.0.3, Nginx 1.4.4, Passenger 4.0.33
I downloaded the latest Bootstrap zip from their site, performed all of the operations found here to included those files directly into my application, and am able to get the glyphicons to show up exactly as expected in my development environment. However, when I deploy to production, the glyphicons show up as squares in Chrome. I added the individual file extensions for the glyphicons files to the production precompile and verified they're showing up in my public/assets folder. The only difference between the js/css files and the glyphicon files is that there's no gzipped file alongside the glyphicon files.
production.rb:
config.assets.precompile = ['*.js', '*.css', '*.eot', '*.svg', '*.ttf', '*.woff']
I know that Rails loads assets differently between development and production, but why isn't it seeing or understanding the glyphicon assets in production? Is there a way to fix this with my current configuration, or do I need to change the way I'm including these assets in a way to allow me to fix this error?
Also, in both development and production I get the following errors every time I render a page that uses a glyphicon, but the icons still show up. Is this related?
- ActionController::RoutingError (No route matches [GET] "/fonts/glyphicons-halflings-regular.woff")
- ActionController::RoutingError (No route matches [GET] "/fonts/glyphicons-halflings-regular.ttf")
- ActionController::RoutingError (No route matches [GET] "/fonts/glyphicons-halflings-regular.svg")