1
votes

I am following Michael Hartl's Learn Enough CSS course. My current folder layout is as follow:

- _layouts
- _site
index.html

where index.html is:

---
layout: test
---

and I have test.html in _layouts as:

Hello again, world.

Whenever I run jekyll serve, I get this error:

Error reading file /Users/pj/Documents/LETGD/repos/pohjie.github.io/_layouts/test.html: no implicit conversion of Hash into Integer 
Error reading file /Users/pj/Documents/LETGD/repos/pohjie.github.io/index.html: no implicit conversion of Hash into Integer 

Does anyone have any idea what's happening? I'm using M1 MacBook, not sure if that is a possible cause as I spent a lot of time install Ruby as well.

Thanks!

1
I don't see this code in your github repo, if you could commit it, it would help. In the meanwhile, can you add to your question the output of bundle exec jekyll build --trace. - Brad West
@BradWest Thanks for replying! It turns out I did not do gem install bundler, which is why I had issues with jekyll! - pohjie
are u using a newer version of ruby? x=> 3? - Adi Prasetyo

1 Answers

0
votes

Quoting from this source:-

Github-Pages uses Jekyll 3.9, which isn’t compatible with Ruby 3. Downgrading to Ruby 2.7 should avoid the problem.

This worked for me.