Sam G-H
Sam G-H

Reputation: 627

Jekyll not generating _sites folder

I am working on a website for a friend and had never used Jekyll or Ruby before. I forked his github project and, while it took me a while I eventually got Jekyll properly (I thought) installed and everything seemed to be working. I branched the project and was working it the branch and at some point it randomly stopped generating the _site folder, although I can't link this to anything specific. I switched back to the master branch and it still wasn't working. I turned off auto regeneration in the _config.yml file and then I started getting the following error:

/Users/SamGavisHughson/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:148:in `parse':couldn't parse YAML at line 16 column 0 (Psych::SyntaxError)  
from /Users/SamGavisHughson/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'  
from /Users/SamGavisHughson/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:119:in `parse'  
from /Users/SamGavisHughson/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/psych.rb:106:in `load'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/convertible.rb:33:in `read_yaml'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/page.rb:24:in `initialize'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:140:in `new'
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll 0.11.2/lib/jekyll/site.rb:140:in `block in read_directories'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:130:in `each'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:130:in `read_directories'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:135:in `block in read_directories'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:130:in `each'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:130:in `read_directories'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:98:in `read'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/lib/jekyll/site.rb:38:in `process'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/bin/jekyll:19:in `load'   
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/bin/jekyll:19:in `<main>'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'  
from /Users/SamGavisHughson/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `<main>'  

I saw on another post (Rails error, couldn't parse YAML) that they mention changing something in config/boot.rb, but I have no idea how to do this and so if anyone could 1. explain how to do this, 2. explain why this error came up so suddenly, or 3. suggest another solution, I would be extremely grateful!

Here is the _config.yml file, but I dont think this is the problem, since it stopped working before I changed it:

permalink: pretty
auto: false
server: true

Upvotes: 2

Views: 2537

Answers (3)

Pradeep Nayak
Pradeep Nayak

Reputation: 675

Running jekyll --no-auto --server would print the error message on why you werent able to generate the _site directory. Let me know if this helps

Upvotes: 2

Sam G-H
Sam G-H

Reputation: 627

I deleted my repo and forked the original again and just redid my work and it seems to be working, at least for now until I mess something else up ;)

Upvotes: 0

Krishna Aradhi
Krishna Aradhi

Reputation: 181

You most likely introduced a syntax error in _config.yml when you edited it to turn off auto regeneration. Try fixing it, or update your question with the contents of the file, so that someone here can take a look at it.

Upvotes: 0

Related Questions