Reputation: 54
I am new to programming and I am trying to make a simple website as an exercise. I use :
The problem I'm facing has something to do with sass, it doesn't load my "style.scss":
application.rb:
require "sinatra"
get "/" do
erb :Home
end
get "/style.css" do
scss :"scss/style"
end
layout.erb:
<html>
<head>
<link rel="stylesheet" href="/style.css" >
<title>Home</title>
</head>
<body>
<div class="article">
<%= yield %>
</div>
</body>
</html>
Home.erb:
<p> text </p>
style.scss:
@import "normalize";
@import "bourbon/bourbon";
@import "base/base";
@import "neat/neat";
$column: 90px;
$gutter: 30px;
$grid-columns: 10;
$max-width: em(720);
body {
background-color: #b8b8b8;
}
a {
color: #CC1212;
}
div.article {
@include outer-container;
background-color: #cfcfcf;
}
The error message says: Sass::SyntaxError - File to import not found or unreadable: neat-helpers
All the .scss files from Bourbon, neat and base have an underscore before the actual name.
So neat.scss => _neat.scss
I don't get what's wrong. Could you help me and maybe explain what I did wrong?
Upvotes: 1
Views: 3328
Reputation: 4116
You need to use a compiler that's going to convert the file to CSS. Use the compass gem to do that.
Here's a basic implementation you can follow:
https://github.com/Compass/compass/wiki/Sinatra-Integration
Upvotes: 2