Reputation: 8047
I have a .css file in
vendor/assets/stylesheets/myfile.min.css
I am trying to refer to that file from my main.css.scss file
@import 'myfile.min.css';
This works on localhost but not on staging. On my application.rb I have
config.sass.load_paths << Rails.root.join("vendor","assets","stylesheets");
But the file is not been found on staging.
Upvotes: 0
Views: 704
Reputation: 35360
As far as I'm aware, you can't import regular CSS files with Ruby's SASS implementation. I follow Node's SASS implementation more closely, and they just recently tried to disable this functionality stating it doesn't align with the SASS spec.
You should look into Rails' asset pipeline. You would add something like this to the top of your main.css.scss
//= require myfile.min
This puts the import burden on Sprockets, leaving SASS to do it's own thing afterward.
Upvotes: 1