anjlab / bootstrap-rails

Twitter Bootstrap CSS (with Sass flavour) and JS toolkits for Rails 3 projects
https://github.com/anjlab/bootstrap-rails
729 stars 96 forks source link

Bootstrap works locally but not on heroku #83

Closed danielristic closed 10 years ago

danielristic commented 10 years ago

I'm using this gem with a standard Rails 4 project.

Here's what I have in my Gemfile:

gem 'anjlab-bootstrap-rails', '~> 3.0.0.3', :require => 'bootstrap-rails'

and in application.css.scss:

@import "twitter/bootstrap";

Bootstrap styles display correctly from the local server, but when I put it on heroku the styles don't show and in the logs I have this.

ActionController::RoutingError (No route matches [GET] "/assets/application-f0d48bdf52d6c4390445f54c105f015c.css"):

Unlike issue #68 , the assets precompilation works fine when pushing on heroku.

danielristic commented 10 years ago

I figured it out, nothing to do with this gem: In order to serve assets on heroku with rails 4, you need to add the rails_12factor gem.