Rails App中的Heroku / Zurb Foundation Sass SyntaxError

时间:2022-06-11 00:13:13

My app is throwing this error when I try to push to Heroku. It looks like the culprit is a rogue !global line in a stylesheet somewhere, but I'm not sure where the source code lives.

当我尝试推送到Heroku时,我的应用程序正在抛出此错误。看起来罪魁祸首是某个样式表中的流氓!全局行,但我不确定源代码的位置。

rake aborted!
Sass::SyntaxError: Invalid CSS after "...odules, $name) ": expected "}", was "!global;"
   (in /tmp/build_6cf14c02-e49b-44e7-819c-871d5da3cf73/app/assets/stylesheets/framework_and_overrides.css.scss:13)

Would greatly appreciate any help.

非常感谢任何帮助。

4 个解决方案

#1


9  

Change your foundation-rails gem from 5.4.4.0 to 5.4.3.1 in your gem file

在gem文件中将foundation-rails gem从5.4.4.0更改为5.4.3.1

gem 'foundation-rails', '5.4.3.1'

宝石'基础 - 轨道','5.4.3.1'

then run

bundle update

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

这应该现在告诉他们修复它:)

Additionally:

As for finding the file "bundle show foundation-rails" use the finder "Go to folder" to the path and find "_function.scss" it is under vendor assets stylesheets foundation _function.scss

至于查找文件“bundle show foundation-rails”使用查找器“转到文件夹”到路径并找到“_function.scss”它在供应商资产样式表基础_function.scss下

Both of my answers could be found in the link by gustavo-beathyate

我的答案都可以在gustavo-beathyate的链接中找到

As for heroku error make sure if your adding any thing to the assets to use

至于heroku错误,请确保您是否将任何内容添加到要使用的资产中

rake assets:precompile RAILS_ENV=production

and then

also when you push use -f

当你推动使用-f时

git push -f heroku master

if not only use

如果不只是使用

git push -f heroku master

#2


0  

Here's a solution:

这是一个解决方案:

http://foundation.zurb.com/forum/posts/19222-sass-syntax-error-on-rails

You basically have to open the gem and modify line 13 in _functions.scss, removing the call to !global.

你基本上必须打开gem并修改_functions.scss中的第13行,删除对!global的调用。

#3


0  

This issue has now been fixed with v5.4.5 of Foundation. See also here for some more background on the issue.

此问题现已通过Foundation的v5.4.5修复。另请参阅此处了解有关该问题的更多背景信息。

#4


0  

I was getting your exact error after I upgraded to foundation-rails 5.5.0.0. I updated the sass-rails gem per this post: https://*.com/a/27807138/1753903 and the error went away.

升级到foundation-rails 5.5.0.0后,我收到了确切的错误。我根据这篇文章更新了sass-rails gem:https://*.com/a/27807138/1753903,错误消失了。

#1


9  

Change your foundation-rails gem from 5.4.4.0 to 5.4.3.1 in your gem file

在gem文件中将foundation-rails gem从5.4.4.0更改为5.4.3.1

gem 'foundation-rails', '5.4.3.1'

宝石'基础 - 轨道','5.4.3.1'

then run

bundle update

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

这应该现在告诉他们修复它:)

Additionally:

As for finding the file "bundle show foundation-rails" use the finder "Go to folder" to the path and find "_function.scss" it is under vendor assets stylesheets foundation _function.scss

至于查找文件“bundle show foundation-rails”使用查找器“转到文件夹”到路径并找到“_function.scss”它在供应商资产样式表基础_function.scss下

Both of my answers could be found in the link by gustavo-beathyate

我的答案都可以在gustavo-beathyate的链接中找到

As for heroku error make sure if your adding any thing to the assets to use

至于heroku错误,请确保您是否将任何内容添加到要使用的资产中

rake assets:precompile RAILS_ENV=production

and then

also when you push use -f

当你推动使用-f时

git push -f heroku master

if not only use

如果不只是使用

git push -f heroku master

#2


0  

Here's a solution:

这是一个解决方案:

http://foundation.zurb.com/forum/posts/19222-sass-syntax-error-on-rails

You basically have to open the gem and modify line 13 in _functions.scss, removing the call to !global.

你基本上必须打开gem并修改_functions.scss中的第13行,删除对!global的调用。

#3


0  

This issue has now been fixed with v5.4.5 of Foundation. See also here for some more background on the issue.

此问题现已通过Foundation的v5.4.5修复。另请参阅此处了解有关该问题的更多背景信息。

#4


0  

I was getting your exact error after I upgraded to foundation-rails 5.5.0.0. I updated the sass-rails gem per this post: https://*.com/a/27807138/1753903 and the error went away.

升级到foundation-rails 5.5.0.0后,我收到了确切的错误。我根据这篇文章更新了sass-rails gem:https://*.com/a/27807138/1753903,错误消失了。