I am working on Michael Hartl Rails tutorial (currently chapter 7). When I try to run server this message appear:
Sass::SyntaxError in Static_pages#home
Showing C:/rails_project/sample_app/app/views/layouts/application.html.erb where line #5 raised:
Invalid CSS after "}": expected "}", was ""
(in C:/rails_project/sample_app/app/assets/stylesheets/custom.css.scss)
Extracted source (around line #5):
2: <html>
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: <%= render 'layouts/shim' %>
Rails.root: C:/rails_project/sample_app
Application Trace | Framework Trace | Full Trace
app/assets/stylesheets/custom.css.scss:104
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___917874405_26658636'
Code from application.html.erb:
<!DOCTYPE html>
<html>
<head>
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<%= yield %>
<%= render 'layouts/footer' %>
<%= debug(params) if Rails.env.development? %>
</div>
</body>
</html>
I have no idea where is the problem. Error message seem to inadequate to code existing in aplication.html.erb. Anyone got clue?
The error is in your style sheet:
Your app is using Sass (http://sass-lang.com) and there is a problem in the file listed above. Fix the .scss error and the error message will go away. Unfortunately, it does not appear to give you an errant line number within that .scss file.