7

I was just fiddling around with some things and happened to run bundle install on my ruby on rails app. I noticed that bootstrap updated from 3.1.1 to 3.2.0 and now when I go to generate certain views, I get this error:

ActionController::RoutingError (No route matches [GET] "/fonts/bootstrap/glyphicons-halflings-regular.ttf"):

Didn't happen until this gem update. Any suggestions? I've tried explicitly using 3.1.1 in the Gemfile and running bundle again, but this doesn't help. It looks just like a simple routing issue, but idk why this would have only changed during the gem update.

LewlSauce
  • 5,326
  • 8
  • 44
  • 91

3 Answers3

8

My problem was with the order I was importing bootstrap in my application.css.scss file. Make sure the order goes:

@import "bootstrap-sprockets";
@import "bootstrap";
gstraehle
  • 611
  • 7
  • 7
0

For anyone who else can't get an answer on this, I manually changed this file:

/home//.rvm/gems/ruby-2.1.1/gems/bootstrap-sass-3.2.0.2/assets/stylesheets/bootstrap/_glyphicons.scss and took out the $icon_path or whatever it was and replaced it with "../assets/bootstrap/

Fixed the problem thereafter.

LewlSauce
  • 5,326
  • 8
  • 44
  • 91
0

I had the same problem like you. After some research these are the most important things i found out:

1) Since bootstrap-sass version 3.2.0 the asset directory moved from vendor/assets to assets/
source: Issue with upgrade to bootstrap-sass 3.2.0

2) The font files from customizer are probably corrupted and should be downloaded directly from the Bootstrap homepage.
source: Bootstrap 3 Glyphicons not working

As you already said; change the version back to 3.1.1.1 should do the trick. I uninstalled the gem via:

gem uninstall bootstrap-sass

Then I changed the version defined in the gemfile and reinstalled it with

gem install bootstrap-sass
bundle update

This might help people facing the same issue.

Community
  • 1
  • 1
Lorro
  • 88
  • 9