maxim / bootswatch-rails

Bootswatches converted to SCSS ready to use in Rails asset pipeline.
MIT License
489 stars 84 forks source link

No route matches [GET] "/img/glyphicons-halflings.png" #30

Closed dbonadiman closed 11 years ago

dbonadiman commented 11 years ago

I obtain this exception while using your css after the themes upgrade:

Started GET "/img/glyphicons-halflings.png" for 127.0.0.1 at 2013-01-14 20:54:38 +0100

ActionController::RoutingError (No route matches [GET] "/img/glyphicons-halflings.png"): actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:21:in 'call' actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in 'call' railties (3.2.11) lib/rails/rack/logger.rb:32:in 'call_app' railties (3.2.11) lib/rails/rack/logger.rb:16:in 'block in call' activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in 'tagged'

if i remove the two css refering to your gem from my css.scss file all works fine.

this is my custom.css.scss

@import "bootswatch/cerulean/variables"; @import "bootstrap";

body { padding-top: 60px; }

@import "bootstrap-responsive"; @import "bootswatch/cerulean/bootswatch";

maxim commented 11 years ago

The problem has two solutions.

First of all, I don't provide glyph icons with bootswatch-rails (will probably include them in upcoming releases). In the mean time you could add them to your rails project manually. Starting with bootswatch-rails 0.3.1 all bootswatch sass variables are marked !default, so you can easily override the image path variables (like $iconSpritePath) to the rails-friendly ones. See README on how to do that.

Second of all, if you don't actually want icons, you could fix your rails routes to ignore those paths.

Hope this helps.