William Schaffer
William Schaffer

Reputation: 35

Jekyll "serve" command error: File to import not found or unreadable: base. Load paths: on line 46

First off, I have little Linux experience and no Ruby experience, however, I have googled and could not find an area like what I'm getting. Any help is appreciated. I apologize if this is not a good place to post this. I have installed Jekyll with the following, and only the following, commands on Ubuntu 15.04 64 bit:

sudo apt-get install ruby-full
gem update --system
gem install jekyll
cd /home/william
mkdir CS
cd CS/
gem install execjs
sudo apt-get install nodejs
jekyll new kx8w

New jekyll site installed in /home/william/KX8W.

jekyll serve

The error returned by Jekyll is as follows:

Configuration file: none
            Source: /home/william/CS
       Destination: /home/william/CS/_site
      Generating... 
     Build Warning: Layout 'post' requested in KX8W/_posts/2015-05-12-welcome-to-jekyll.markdown does not exist.
     Build Warning: Layout 'page' requested in KX8W/about.md does not exist.
     Build Warning: Layout 'default' requested in KX8W/index.html does not exist.
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'KX8W/css/main.scss':
                    File to import not found or unreadable: base. Load paths: on line 46
    jekyll 2.5.3 | Error:  File to import not found or unreadable: base.
Load paths:
   on line 46

Upvotes: 3

Views: 1248

Answers (1)

Alan W. Smith
Alan W. Smith

Reputation: 25425

Welcome to Linux! You were close but need to make sure you're in the correct directory before running jekyll serve.

When you run:

jekyll new kx8w

It creates the new site in the directory you're currently in. The output line tells you where it put it (i.e. "/home/william/KX8W"). You need to be in that directory to start jekyll. So, do:

cd /home/william/KX8W

Once you do that jekyll serve will work as expected.


Note that for some reason jekyll built the site in the "/home/william/KX8W" directory instead of under the "/home/william/CS/KX8W" which is what I'd expect given your list of commands. That's probably related to the installs you did or maybe there was another change. Nothing to worry about, just something to watch out for. The biggest trick is just to make sure that after you run the jekyll new cool_new_site command you then change into that directory with cd cool_new_site before running jekyll serve.

Upvotes: 8

Related Questions