-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Sass compile issue #5811
Comments
same here. How is this supposed to work without removing this line? version: 5.4.3 (from bower.json) |
deleting the |
Your Rails project is likely compiling using an older version of Sass. See if you can get it to at least Sass 3.3 and then it should work properly. Or removing the |
The error occurs when using sass-rails 4.0.3 which installs sass 3.2.19. That's the default for Rails 4.1.6, the most recent version of Rails. If Foundation v5.4.4.0 requires a newer version of Sass, you're out ahead of Rails and the gemspec should force the newer version of Sass. |
@gakimball I'm the author of the book Learn Ruby on Rails and I use Foundation in the book to introduce Rails to beginners. It's important, especially for beginners that have no experience with gem versions and troubleshooting, that the experience of setting up a Rails application with Foundation should be trouble-free. Do you have a release process in place that tests compatibility with Rails by building a simple Rails application with the current version of Rails? This has happened before (foundation-rails 5.1.1.0 was incompatible with the Rails asset pipeline). I'd be happy to provide a simple Rails application that you could add to your testing regimen (you could use the rails-foundation example application). I don't know why we're seeing these release issues with foundation-rails, but I hope something can be done to avoid these glitches. |
Same here, we're using |
You can manually edit the _functions.scss of the installed gem, which in my case is located at /home/paul/.rvm/gems/ruby-2.1.2@propproj/gems/foundation-rails-5.4.4.0/vendor/assets/stylesheets and remove the !global flag in the above mentioned bit of code or maybe try the 'sass-rails' 5 beta which I haven't done. Otherwise Daniel's suggestion to set the rev level to 5.4.3.1 in your gemfile for now keep you running. |
@paullaz Since we have an app that's used by multiple devs and is hosted as well, modifying files in gems aren't really an option. For now we need to stick to '5.4.3.1'. Another thing we tried is to use 'sass' and |
Very interested in this issue as well. I had to manually edit the _functions file to remove !global, but this isn't ideal because Heroku and other SaaS VPS won't allow this edit, which means we can't deploy! |
Removing the !global also prevents the import once functionality from working, at least when using libsass. Switching to ruby sass fixes the issue. This should probably be fixed soon for those who use libsass. |
- There is a known issue with the latest Foundation Rails release that causes SASS compile issues in Rails apps due to requiring a newer version of SASS that Rails is currently incompatible with. - See [Issue 5811](foundation/foundation-sites#5811) for details.
I had to backup to |
It looks like 5.4.5.0 fixes this via this commit. |
Has anyone tested it? When I removed that line it removed the functionality that prevented stylesheets from being compiled multiple times. |
So we put out the new patch, which fixes things for Sass 3.2, 3.3, and libsass, but in the process we had to axe support for Sass 3.4. (This wasn't specified in the changelog that went out last night so I just added it.) The Sass will still compile in 3.4, but because of the changes in variable scope the import-once functionality breaks. New projects created via It's not an ideal solution, but it's all we can do after we told Sass 3.4 folks "yes you can upgrade". Now we have to tell them not to. So if you're upgrading an existing project on our Compass stack, add a Gemfile to the root of your project with these lines: source "https://rubygems.org"
gem "sass", "~> 3.3.0"
gem "compass", "~> 1.0.0" Then run |
Fixes multiple inclusions of _global.scss when compiling.
Hi Guys, Took me a while to get a Rails app up and running with Here is what is in my gem file: #gem 'sass-rails', '~> 4.0.3'
gem 'sass-rails', github: 'rails/sass-rails', branch: 'master'
gem 'sass', '~> 3.3.0'
#gem 'compass-rails'
gem 'compass-rails', '~> 2.0.1'
#gem 'compass-core', github: 'Compass/compass', branch: 'stable'
gem 'compass', '~> 1.0.1'
gem 'foundation-rails', '5.4.5.0'
gem 'foundation-icons-sass-rails', '~> 3.0'
gem 'sprockets', '~> 2.12.0' Hope that helps other people trying to get it all working in rails. |
Looking forward to a proper fix for this - having such a breaking change in a patch version really threw things off. Here's some more context for anyone else who might have stumbled across this rabbit hole: bdkjones/CodeKit2#443 (comment) |
Hi, just updated Foundation to 5.5 with bower and now can't compile anymore with grunt/sass - I was using SASS 3.2, tried to update to 3.3.9 or 3.4x but to no avail. On 3.3.9 I get several deprecation warnings. On all versions I get a syntax error concerning usage of incompatible units 'rem' and 'px' found in line 247 of _top-bar.scss (probably others too, grunt exited), and an error in !global used in modules in _functions.scss exports - was expecting '}' seems like dependency hell is back... what version of sass one should use to compile Foundation? what else should I have in check? |
I havent tested yet 5.5 (still to fresh even for me) but the changelog suggests it should work with |
well one of the issues was the "!global" mentioned in OP, anyways will do another test once I figure out which specific 3.3.x or 3.4.x is best suitable |
|
This has been resolved here: #6148 (comment) |
See this for more info: foundation/foundation-sites#5811 (comment)
This bit in _functions.scss fails in 5.4.4.0 on Rails
$modules: () !default;
@mixin exports($name) {
@if(not index($modules, $name)) {
$modules: append($modules, $name)} !global;
@content;
}
}
The "!global" is new from 5.4.3.1, removing it allows Rails to work.
The text was updated successfully, but these errors were encountered: