CSS Loading Locally But Not in Heroku for a Rails App

CSS works locally but not loading on Heroku

You're production environment most likely doesn't have these set

config.serve_static_assets = true
config.assets.compile = true

Rails 4: CSS not compiling locally and on heroku

There is an error inside of app/assets/stylesheets/static_pages.css.scss on line 4.

Try this:

@import url('//fonts.googleapis.com/css?family=Varela+Round|Oswald:400,300,700');

Glyphicon works locally but not on Heroku

The solution was to change config.assets.compile = false to config.assets.compile = true in the config/environments/production.rb file.

Rails 4 - App works locally, but not on Heroku

Don't forget rake assets:precompile. In the case of rake aborting from invalid css, check the bootstrap_and_overrides.css for any added less code. I've noticed that generating this from the twitter-bootstrap-rails gem has in the past done this to me.



Related Topics



Leave a reply



Submit