I did not remove scaffolding css file from stylesheets directory. That messed up css on heroku. I deleted the file and uploaded to Heroku and css worked.
bootstrap heroku not showing
-
15-07-2023 - |
Вопрос
I am using gem 'bootstrap-sass' on heroku along with gem 'sass-rails', '~> 4.0.0' On my local server I can see my css changes but when I load to heroku, my custom css gets overwritten.
For instance in my local server, I can clearly see the css file in chrome developer tool as
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
but on css this gets over written. I mean I can see the chrome developer tools that in heroku the above line gets strike down and another font gets shown
font-family: verdana, arial, helvetica, sans-serif;
I have not added this font. Further the "body-background color" css color gets strike out and default white background is shown as body background color.
Can any one give any pointers.
This is how my production.rb looks like
Rails.application.configure do
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = false
config.assets.js_compressor = :uglifier
config.assets.compile = false
config.assets.digest = true
config.assets.version = '1.0'
config.log_level = :info
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
config.log_formatter = ::Logger::Formatter.new
config.active_record.dump_schema_after_migration = false
config.action_mailer.default_url_options = { host: 'http://MY_CUSTOM_NAME.herokuapp.com' }
end
Решение