访客中的Sass :: SyntaxError #new

时间:2015-01-04 14:46:22

标签: css ruby-on-rails

我是Ruby新手,渴望学习!我现在正在按照Capstone Rails教程第1册中的教程进行操作,但遇到一个小问题。我希望你们能帮助我。

我已经向Zurb Foundation申请了,现在教程告诉我测试它,但是我收到了一个错误。我无法在Google上找到解决方案..
我通过Nitrous.io使用Ruby 2.1.5   我会添加我看到的所有信息,很抱歉,如果这不是方法,但只是让我知道,以便我将来可以改进这一点!我们走了:

当我启动服务器并想要预览时,
我收到这个错误:

**Sass::SyntaxError in Visitors#new**  


*Showing /home/action/workspace/learn-rails/app/views/layouts/application.html.erb where line #7 raised:  
Invalid CSS after "...ules: $modules ": expected "}", was "!global;"  
  (in /home/action/workspace/learn-rails/app/assets/stylesheets/framework_and_overrides.css.scss:13)*    

4 <meta name="viewport" content="width=device-width, initial-scale=1.0">
5 <title><%= content_for?(:title) ? yield(:title) : "Learn Rails" %></title>
6 <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Learn Rails" %>">
7 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
8  <%# Modernizr is required for Zurb Foundation %>
9 <%= javascript_include_tag 'vendor/modernizr' %>
10 <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>

应用程序跟踪:

app/assets/stylesheets/framework_and_overrides.css.scss:2
app/views/layouts/application.html.erb:7:in     '_app_views_layouts_application_html_erb___1613058967742566382_40390520'

编辑5-1-014。这是在Framework_and_overrides.css.scss

// import the CSS framework
@import "foundation";

// override for the 'Home' navigation link
.top-bar .name {
  font-size: rem-calc(13);
  line-height: 45px; }
.top-bar .name a {
  font-weight: normal;
  color: white;
  padding: 0 15px; }

// THESE ARE EXAMPLES YOU CAN MODIFY
// create mixins using Foundation classes
@mixin twelve-columns {
  @extend .small-12;
  @extend .columns;
  }
@mixin six-columns-centered {
  @extend .small-6;
  @extend .columns;
  @extend .text-center;
  }
// create your own classes
// to make views framework-neutral
.column {
  @include six-columns-centered;
  }
.form {
  @include grid-column(6);
  }
.form-centered {
  @include six-columns-centered;
  }
.submit {
  @extend .button;
  @extend .radius;
  }
// apply styles to HTML elements
// to make views framework-neutral
main {
  @include twelve-columns;
  background-color: #eee;
  }
section {
  @extend .row;
  margin-top: 20px;
  }

1 个答案:

答案 0 :(得分:0)

我通过更新gemfile.lock中的sass-rails解决了这个问题,然后运行了bundle更新。 在那之后,错误消失了!