2

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
Community
  • 1
  • 1
Sam G-H
  • 627
  • 6
  • 17
  • Welcome to StackOverflow! To help find your answer, other people need to see your source as well as the error message you're receiving. Post a link to the Github fork you're working on you'll get your answer much faster. – Alan W. Smith Aug 30 '12 at 12:45
  • if someone new to jekyll is watching this post, dont forget `bundle exec jekyll serve` in your jekyll website dir after `jekyll new myblog` – TechDogLover OR kiaNasirzadeh Nov 06 '19 at 15:21

3 Answers3

2

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

Pradeep Nayak
  • 675
  • 1
  • 10
  • 24
  • 1
    This helped me, thanks! I was having having build errors using jekyll on github pages, Using `jekyll --pygments --no-lsi --safe`, as gh suggests, which wasn't giving a meaningful error message; this did! – JKirchartz Apr 07 '13 at 13:52
0

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.

Krishna Aradhi
  • 181
  • 2
  • 7
0

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 ;)

Sam G-H
  • 627
  • 6
  • 17