0
我是Ruby新手,渴望學習!我現在正在遵循最重要的Rails教程第一冊的教程,但遇到一個小問題。我希望你們能夠並會幫助我。Sass :: SyntaxError in Visitors#new
我已經與Zurb基金會提出申請,現在教程告訴我要測試它,但我得到一個錯誤。我在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;
}
什麼在'framework_and_overrides.css.scss'? – 2015-01-04 14:50:19
Hi @JiříPospíšil,謝謝你的留言。我編輯了這篇文章,查看framework_and_overrides.css.scss。 – Roy 2015-01-05 11:09:25