Okay, so I have had this issue before where the @import in my css.scss files required the extension:
@import 'layout.css.scss'
instead of
@import 'layout'
Not sure why this only happens in production (locally I have no problems). I hate having to add the extension, not sure why, I guess it just annoys me that I have to type it out? :)
My problem I'm having though is that I cannot seem to get compass to work in production. I'm using the compass-rails gem. I have a _config.css.scss file which has the following imports at the top:
@import "compass";
@import "compass/css3";
I tried adding css.scss to them and then the files are not found (even locally). So my questions are this:
Is there ANY WAY I can use @import without having to include the file extension(s)?
If not, how do I get Compass to work?
Again this is only affecting me in production.
I've tried a few different things I've found on Stackoverflow already but nothing has helped.
Sass import error in Rails 3 app - "File to import not found or unreadable: compass"
The exact error I get when I run the app on production:
Completed 500 Internal Server Error in 920ms
ActionView::Template::Error (File to import not found or unreadable: compass.
UPDATE
I did successfully add .scss to my compass import
@import 'compass.scss'
This no longer threw the 'file not found' error LOCALLY.
But in production I am still getting this error:
ActionView::Template::Error (File to import not found or unreadable: compass.scss
So this tells me that maybe my Compass gem is not working correctly in production?
Delete your Gemfile.lock
and
just put gem 'compass'
and gem 'compass-rails'
in Gemfile.
After this try bundle install
for production env.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With