Question

I am currently working on a Rails application that uses the bootstrap-sass gem to help style some of my front end views. When running locally, I have no problem browsing the views. After Heroku deployment, I receive the following error:

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

Here is a snippet of my application.rb file:

# Enable the asset pipeline
config.assets.enabled = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

config.assets.compile = true
config.assets.initialize_on_precompile = false

Any thoughts as to how to get bootstrap-sass working on a Heroku deployment with asset pre-compilation?

Was it helpful?

Solution 2

I had my bootstrap import statements in my application.css file. By moving to a bootstrap_and_overrides.css.scss file, my problem was solved.

This post helped: Getting bootstrap-sass bootstrap CSS into production on Heroku

OTHER TIPS

Did you install the 12factor gem? You'll need that with Rails

gem 'rails_12factor', group: :production

https://devcenter.heroku.com/articles/getting-started-with-rails4#heroku-gems

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top