This is my application.css.sass :
@import "global.css.sass"
@import "bootstrap.css"
When I look at the source at my localhost application.css?body=1 I see this:
@import url(bootstrap.css);
#content-wrap {
width: 90%;
margin: 0 auto; }
So the global.css.sass contains this :
#content-wrap
width: 90%
margin: 0 auto
So that was imported appropriately, but not bootstrap.css file. And it works on the localhost because its on the file path locally. However in production my assets are on aws:
application-a0546f0315a891e8129e1f8e49eb7e45.css
When looking at source the content is the same as on my localhost, however there is not bootstrap on the path so that file is missing, and I wonder why isn't it all bundled in all one big application file, here are my assets related config.
Development :
config.assets.compress = false
config.assets.digest = false
Production :
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
What am I doing wrong here? Any help is appreciated
Update :
This is sample bit from my chrome console :
Request URL:http://my-bucket.s3.amazonaws.com/assets/bootstrap.css
Request Method:GET
Status Code:403 Forbidden
@import takes a filename to import. By default, it looks for a Sass file to import directly, but there are a few circumstances under which it will compile to a CSS @import rule. Do you get any 404 on your console by any chance? I think the bootstrap.css is not beeing published in your productive environment. The lazy solution would be to refactor tobootstrap.scssand let it be merged into yourapplication.cssI think the bootstrap.css is not beeing published in your productive environmentYes this is true. Not sure why it isn't being bundled into myapplication.css.css. You use a classic css import which is unequal to the sass@importfunction. Rename the bootstrap.css to bootstrap.scss (in the file and in the import) and it should work.