Skip to content
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.2 Invalid CSS !global #6148

Closed
chrishough opened this issue Dec 23, 2014 · 32 comments
Closed

rails 4.2 Invalid CSS !global #6148

chrishough opened this issue Dec 23, 2014 · 32 comments
Labels

Comments

@chrishough
Copy link

It looks like the !global issue came back with the launch of rails 4.2 tonight.

Sass::SyntaxError at /join
Invalid CSS after "...ules: $modules ": expected "}", was "!global;"

Error Details:

// IMPORT ONCE
// We use this to prevent styles from being loaded multiple times for compenents that rely on other components.
$modules: () !default;
@mixin exports($name) {
  // Import from global scope
  $modules: $modules !global;
  // Check if a module is already on the list
  $module_index: index($modules, $name);
  @if (($module_index == null) or ($module_index == false)) {
    $modules: append($modules, $name) !global;
    @content;

The only thing I could do to get around this was to downgrade my gem to gem 'foundation-rails', '5.4.5'

Can anyone point me in the right direction? Thanks and Merry XMAS.

@lazybios
Copy link

I have the same error when use foudation-rails 5.5.0.0

@ghost
Copy link

ghost commented Dec 25, 2014

Me too. Following.

@asciant
Copy link

asciant commented Dec 28, 2014

Same error, following.

@jakzaizzat
Copy link

Try this. My problem solved with this

gem 'foundation-rails', '5.4.3.1'

then run

bundle update

This should do it for now tell they fix it :)

@chrishough
Copy link
Author

@jakzaizzat as I posted earlier, you can also use gem 'foundation-rails', '5.4.5'

@gakimball
Copy link
Contributor

sass-rails version 5.0.0 is out now, which should make Rails compatible with Sass 3.4, and thus compatible with our codebase.

@rafibomb rafibomb added the rails label Jan 8, 2015
@rafibomb rafibomb closed this as completed Jan 8, 2015
@Kriyo
Copy link

Kriyo commented Jan 9, 2015

@jakzaizzat & @chrishough cheers for the fix (Y)

@rdetert
Copy link

rdetert commented Jan 10, 2015

Thanks @gakimball Adding gem 'sass-rails', '~> 5.0.0' works like a charm

@paulman93
Copy link

I have the gems "sass-rails", "5.0.0" "foundation-rails", "5.4.5" and "sass", "3.4.9" and i still get the same error
Sass::SyntaxError at /
Invalid CSS after "...ules: $modules ": expected "}", was "!global;"

I cant figure out where the problem is. Please help!

@gakimball
Copy link
Contributor

Foundation 5.4.5 isn't compatible with the newest version of Sass, but 5.5 is.

@hayduke19us
Copy link

Rails 4.1.9
gem 'foundation-rails'
gem 'sass-rails', '~> 5.0.0'

Worked for me

@shaekuronen
Copy link

Rails 4.1.8
gem 'foundation-rails'
gem 'sass-rails', '~> 5.0.0'

Did not work for me

However

Rails 4.1.9
gem 'foundation-rails'
gem 'sass-rails', '~> 5.0.0'

Did

Thanks @hayduke19us !

@ssoulless
Copy link

Ok this worked for me

Rails 4.1.9
gem 'foundation-rails', '> 5.5.0'
gem 'sass-rails', '
>5.0.0'

And do not forget to run 'bundle update' in order to update your sass version it has to be 3.3.x or higher in order to run foundation 5.x

@chrishough
Copy link
Author

I can confirm that gem 'sass-rails' fixes this issue as it loads version 5.0.1

@paulman93
Copy link

I have it working now with,

Rails 4.2.0
gem 'foundation-rails', '> 5.5.0'
gem 'sass-rails', '
> 5.0.1'

@JonKernPA
Copy link

Hmmm, struggling with upgrading:

Ruby 2.1.1

rails (4.2.0)
foundation-icons-sass-rails (3.0.0)
foundation-rails (5.5.0.0)
sass (3.4.10, 3.2.19)
sass-rails (5.0.1)

@mwathi
Copy link

mwathi commented Feb 2, 2015

ditto @jakzaizzat

@taiwoayanleye
Copy link

@JonKernPA
gem 'rails', '4.1.6'
gem 'sass-rails', '>= 4.0.4'
gem 'foundation-rails', '5.4.5'

worked fine

@a17levine
Copy link

thanks everyone, downgrading foundation was key for me

@DaniG2k
Copy link

DaniG2k commented Mar 1, 2015

I'm getting this error as well. Is there any change it will be fixed soon without having to downgrade?

@gakimball
Copy link
Contributor

@DaniG2k It has been fixed, you just need to use Sass 3.4+ in your asset pipeline. If you can't do that because other libraries require a lower version, use Foundation 5.4.7 instead. 5.5 is the point where we deprecated Sass 3.3 and lower.

@DaniG2k
Copy link

DaniG2k commented Mar 1, 2015

@gakimball Great! Thanks. Sorry I didn't catch that in the thread 😖

@introvert
Copy link

I'm unable to resolve this error with:

gem 'sass-rails', '> 5.0.1'
gem 'foundation-rails', '
> 5.5.0'

I do not plan on downgrading, because I upgraded with intention of getting rid of some old Foundation errors.

What to do?

@soyarsauce
Copy link

Had the same issue but on rails 4.1.1, was using older version of sass-rails, below worked:

gem 'sass-rails', '> 5.0.3'
gem 'foundation-rails', '
> 5.5.0.0'

@introvert check your sass version

@unRARed
Copy link

unRARed commented May 6, 2015

I ran into this with my Grunt workflow and gem update sass worked for me. Just thought I'd mention for the people using Foundation without Rails.

@rdamborsky
Copy link

Thanks guys, downgrading foundation-rails helped!

@takayuki905
Copy link

Same error, following.

1 similar comment
@Bastes
Copy link

Bastes commented Nov 13, 2015

Same error, following.

@gakimball
Copy link
Contributor

@takayuki905 @Bastes This issue has already been resolved, just make sure you're using the newest Sass compiler in your Rails project.

@Bastes
Copy link

Bastes commented Nov 17, 2015

@bakimball Ah, finally found what prevented my upgrade, now everything's fine and up to date. Thanks.

@danjames68
Copy link

Upgrading sass-rails to 5.0.1 worked for me.

@IlkhamGaysin
Copy link

gem "foundation-rails", "= 5.5.2.1"
gem "sass-rails", "= 5.0.3"

worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests