Reputation: 97
I'm using Jekyll to create a static website and want to use the framework Bourbon
to build my CSS from.
I've installed Jekyll and want to install Bourbon by adding it to my Gemfile using gem 'bourbon'
and running bundle install
.
Now when I add the rule @import 'bourbon';
to my SCSS file and start to run Jekyll by jekyll serve -w
it starts, but when I modify my SCSS file the Jekyll watcher throws an error saying:
Regenerating: 1 files at 2014-07-03 10:00:11 `Conversion error: There was an error converting 'css/main.scss'.`
...error:
Error: File to import not found or unreadable: bourbon. Load path: /Users/mark/Code/markdejong.com/mistermark.github.com.jekyll/_sass
Error: Run jekyll build --trace for more information.
What can be the problem here? Shouldn't it be possible to import it like this or doesn't Jekyll support this?
Upvotes: 1
Views: 3073
Reputation: 3927
Assuming you have a Gemfile:
source 'https://rubygems.org'
gem 'jekyll'
gem 'bourbon'
gem 'neat'
Add this line to _config.yml
gems: [bourbon, neat]
Jekyll will require these gems automatically.
Just do for import:
@import 'bourbon';
@import 'neat';
Check Jekyll docs for more information http://jekyllrb.com/docs/plugins/
Upvotes: 9
Reputation: 5037
Did you import Bourbon at the Ruby level, with require 'bourbon
?
Or in your Sass configuration?
With Sass, to use Bourbon installed with RubyGems, you have to tell the following command (note the argument -r bourbon
):
sass -r bourbon -w css:sass
I do not know Jekyll, but it's perhaps a clue?
Upvotes: 0
Reputation: 52829
Did you do a
bourbon install
In order to create the bourbon folder ?
Bourbon's doc also says that for non rail app the import rule is :
@import 'bourbon/bourbon';
Upvotes: 3