New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Susy incompatible with rails. #315
Comments
Hey Joshua - What versions of Sass, Compass & Susy are specified in your gem file? Nearly all three of them recently released new versions, so it's possible that the right version dependencies are not installed. |
Hmm, looks like there are conflicting requirements. I forced all gems to the latest (don't no why I was picking up old versions on a new project).
|
Did you use @ericam - Is any of this obvious to you? If not, I'll try to replicate it in a Rails app and report back tomorrow. |
The rails app was new as of hours ago so bundle install after removing the lock file would not help. I forced the upgrade by setting |
Okay, that makes sense. Do you think this is a bug we should report to Sass and Compass? Is there something else I can do to help? It sounds like you have a handle on things. |
Well I'm forcing the issue blindly. I don't know if these hard dependencies are true requirements, it's starting to look like it, since compass 0.12.2 doesn't play nice with sass 3.3. Does susy really require sass 3.3 or is 3.2 good enough? Because neither sass-rails nor compass-rails can use 3.3 yet as far as I can tell. |
Susy does require Sass 3.3 because it uses the maps feature extensively. However, we built in a fallback option to use Susy with older versions of Sass. Try undoing the forced fix and instead of using Edit: Actually, I'm not certain that will work in this scenario... I'll look into it and get back to you on this tomorrow. |
Ok, I have confirmation here: rails/sass-rails#198 I guess the latest susy and sass-rails are mutually exclusive at the moment. Too bad. |
Actually, the new Susy gem requires 3.3, no matter which syntax you use. If you want to use the old syntax along with Sass 3.2, you have to use the 1.0.9 release. |
@JoshuaKolden Did you ever find a solution for this? I'm having the same issue and can't seem to find the answer anywhere! |
@nicollecastrong sadly no. I had to give up on using susy and sass 3.3. |
According to the conversation in #339, Rails 4 does now support Sass 3.3. |
@ericam I've spent hours upon hours going through the issues on sass-rails but even when I include the latest sass-rails gem with a link to their github (since I read in their issues that the rubygems.org version is a bit outdated as far as sass-rails' dependencies go), aka:
I was still having problems. It's not susy's fault of course (I'm a big fan by the way!!), it's just that sass-rails, as @JoshuaKolden was saying, doesn't FULLY support sass 3.3 yet. So I'm using sass-rails 4.0.0 instead of the latest version because its dependencies don't seem to mess with the fact that susy and breakpoint need sass 3.3. @JoshuaKolden, I got it working like this. In my gemfile:
That In my application.rb file:
I created a config/compass.rb file, following what was done in this blog tutorial, so that I could tell compass to look for files in subdirectories (I was having trouble @import -ing files that were in subdirectories within app/assets/stylesheets). This is how my compass.rb file looks now:
That last line is what tells compass to look for .sass files (and .sass partials) in subdirectories. I suppose I'll have to add to this array if I add more directories to app/assets/stylesheets. There's probably a better way (I'm thinking regex) to do this, but I've only been coding for a few months, so I still struggle with regex. And then in my application.css.sass file (or other partials ultimately being brought into that file, your call), you implement it all by doing:
Hopefully this will bring you back to Team Susy2! PS: I'm using rails 4.0.5, in case anyone wants to know! (And I wasn't allowed to even consider changing it as I tried to find a solution...boss has his reasons for wanting that particular release of rails, so finding a way to get all the gems to cooperate was made even harder by the fact that the rails version was set in stone). |
In case anyone wants to use susy without compass like we do (and in our case we have also bourbon which is requiring sass 3.3) this combination seems to work fine: sprockets (2.11.0) <-- we had to lock this specific version |
This dependency issue in Rails 4 with susy2, rails compass and rails sass is still opened as far as I could see around the web... I just spent 1h trying to add susy 2 to my project... Thamn are those dependencies a bi*ch... To set up rails 4, sass-rails, compass-rails and susy I changed my Gemfile into:
What I didn't want to do, but ended up doing is updating rails from |
sass-rails is now at 5.0.0 and this works for me
|
Following: http://susydocs.oddbird.net/en/latest/install/#quick-start
In a Rails 4 app. I get
Undefined mixin 'span'.
In my
application.css.sass
I have:Documentation bug? Suggestions on how I can get started with susy?
Thanks.
The text was updated successfully, but these errors were encountered: