-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Rails 4 Susy 2 Incompatible #339
Comments
I think there should be documentation to get sass 3.3.0 into a Rails 4 project. Rails 4 ships with sass-rails (which wraps sass 3.2.0) and there is no 3.3.0 sass rails wrapper. |
@ericam If you can point me to a changelog or something to that nature that shows what part of 3.3 you need that isn't included in 3.2, I'd be more than happy to do a PR for you 😄 |
I don't know much about rails, but it seems like someone found a workaround? See #316. @kulte Thanks for the generous offer, but it's not realistic. Sass 3.3 adds the "map" data-type to sass-script (this is different from "source maps"). Susy 2 relies on maps internally for nearly all the data management, and also in the public syntax. Making Susy 2 work with Sass 3.2 would require writing a completely new version of Susy, with new syntax and new logic (e.g. "Not Susy"). :) You're welcome to do it. It's been done before. But we won't be merging that in any time soon. You should really be submitting a PR on the Sass-Rails project. Why haven't they updated? |
Has anyone found a way to get Susy (new or old) working with Rails 4? Really want to use it for an application, but tried #316 and still no luck. Even tried just copying and pasting the sass files into my application, but then I started getting missing compass scss files. |
There should be no problem running Susy 1 versions on Rails 4. The issue here is that Susy 2 requires Sass 3.3, which is not supported yet by Sass-Rails. |
Sass-rails gem version 4.0.2 & 4.0.3 add a dependency on sass "~>3.2.0" which does not play well with Susy dependency on sass 3.3 The fix for this would be to use Sass-rails gem version 4.0.1 which depends on sass ">= 3.1.10" To make this change in your rails project you could go to your Gemfile and specify your sass-rails gem version like this: Hope this helps! |
Hi, I don't know if it is relevant but I've been struggling with getting Susy to work with Rails 4.0.1 and I finally managed with the following Gemfile:
Granted it uses 2.1.0, but it's better than nothing! |
The sass-rails gem allows Sass v3.3. Can this issue be closed? |
@metaskills where'd you get the idea that sass-rails allows 3.3? https://github.com/rails/sass-rails/blob/master/sass-rails.gemspec#L18 edit: nevermind, I think it does work sorry |
The |
Yep, just edited |
👍 :) |
yay! |
Hey so it sounds like we're good to go with Suzy 2 on Rails 4 now? (super excited if so!) |
I don't have rails to test on, but that's my understanding. Let me know if that doesn't work for you. |
Awesome, looks like this works with Rails 4! For anyone else who comes across this and looking for the set up, it's below. Still some incompatibilities with the "listen" gem if you're using Spork or Guard. Had to remove those to use susy but so be it Gemfile:
application.rb:
application.css.scss (using sprockets)
|
Bundler will require all your gems for you, so those should not be needed. require 'compass'
require 'susy' |
Compatibility with sass-rails and compass is still broken. Although it may work on some setups it's nightmare with others. Hopefully sass-rails will be patched to a useable state "soon" |
Hey guys, here's an update for those of you trying to use Compass, Susy 2 and Rails 4.1. In your Gemfile:
In your application.rb:
In your stylesheet:
|
@trev Win! This absolutely works! Thank you so much for figuring that out. Do you want to send a PR to add this to the docs? If not, I will do it tonight. |
I am ready to donate beer. |
@ramschmaerchen Yes, @trev deserves a beer for this. So stocked that sass-rails finally caught up with Sass 3.3, too, as they were the reason this couldn't happen before. |
There you go: #391 |
Woop woop! Merged. Thanks again. |
@trev one question, is it necessary add require 'susy' to the application.rb file ? because with the rails/all suppose to add all the gems listed in the gemfile right ? |
I've got a brand new Rails 4 project and when I add gem 'susy', '>= 2.1.2' I get this:
Bundler could not find compatible versions for gem "sass":
In snapshot (Gemfile.lock):
sass (3.2.19)
In Gemfile:
susy (>= 2.1.2) ruby depends on
sass (~> 3.3.0) ruby
I don't think susy 2.1.2 is compatible with Rails 4?
The text was updated successfully, but these errors were encountered: