Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

@import does not import partials from same folder anymore #75

tvdeyen opened this Issue Dec 3, 2011 · 5 comments


None yet
4 participants

tvdeyen commented Dec 3, 2011

Your README says:

"... imports relative to the folder of the stylesheet that is doing the importing."

That is not correct anymore. Since yesterday? Maybe? (I am using sass-rails-3.1.5) it does import the partials relative to the root of assets/stylesheets.

My stylesheets and mixins are all in assets/stylesheets/alchemy:

Before the update:

@import "defaults";

After I had to change it to:

@import "alchemy/defaults";


chriseppstein commented Dec 4, 2011

I have passing tests that show that relative imports work. Can you explain your file/directory and import structure in more detail? Maybe it's different. Or even better, add a failing test case.


spastorino commented Dec 29, 2011

@tvdeyen is this still an issue for you?

tvdeyen commented Jan 3, 2012

I am very sorry guys, that I came back for this so late.

And yes, this is still in issue for me.

Sorry @chriseppstein I cannot provide a failing test case, because of my short time ;(

I have a .css.scss file where I want to import a partial:

# /Users/tvd/code/ruby/gems/alchemy_cms/app/assets/stylesheets/alchemy/menubar.css.scss
@import "defaults";

The _defaults.scss partial is in the same directory as the scss file:


Opening the template that includes this file in a browser raises this error:

File to import not found or unreadable: defaults.
Load path: Sass::Rails::Importer(/Users/tvd/code/ruby/gems/alchemy_cms/app/assets/stylesheets/alchemy/menubar.css.scss)
  (in /Users/tvd/code/ruby/gems/alchemy_cms/app/assets/stylesheets/alchemy/menubar.css.scss)

If I add the alchemy prefix to the partial import fixes this:

@import "alchemy/defaults";

Strangely all my other scss files do not have this issue.

If you want to look into the code yourself, or even better, install the gem:


Thanks for your help and @chriseppstein for your great sass stuff. I ❤️ it!!


chriseppstein commented Jan 3, 2012

I will try to reproduce again soon.

Not solved yet ? I am facing the same problem.

On linux/macos sass include the file, but on windows I receive this error ( File to import not found or unreadable ).

@frodsan frodsan closed this in 9e4aeaf May 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment