Error when executing `jekyll serve`

I get the above error on a freshly created site when executing jekyll serve. I followed the directions on the site for install on Ubuntu (20.04). Any ideas on where I went wrong?

Relevant error for the odd formatting on pastebin:

Liquid Exception: superclass mismatch for class Mark in /home/sfunk1x/workspace/websites/testsite/_posts/2021-05-02-welcome-to-jekyll.markdown
                    ------------------------------------------------
      Jekyll 4.2.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
Traceback (most recent call last):
	56: from /home/sfunk1x/gems/bin/jekyll:23:in `<main>'
	55: from /home/sfunk1x/gems/bin/jekyll:23:in `load'
	54: from /home/sfunk1x/gems/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
	53: from /home/sfunk1x/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	52: from /home/sfunk1x/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	51: from /home/sfunk1x/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	50: from /home/sfunk1x/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	49: from /home/sfunk1x/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	48: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	47: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	46: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
	45: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	44: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in `process'
	43: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:in `build'
	42: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in `process_site'
	41: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:80:in `process'
	40: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:210:in `render'
	39: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:530:in `render_docs'
	38: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:530:in `each_value'
	37: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:531:in `block in render_docs'
	36: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:531:in `each'
	35: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:532:in `block (2 levels) in render_docs'
	34: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/site.rb:547:in `render_regenerated'
	33: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:63:in `run'
	32: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:80:in `render_document'
	31: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/renderer.rb:131:in `render_liquid'
	30: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:36:in `render!'
	29: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:70:in `measure_time'
	28: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:37:in `block in render!'
	27: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:63:in `measure_bytes'
	26: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:38:in `block (2 levels) in render!'
	25: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:59:in `measure_counts'
	24: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/liquid_renderer/file.rb:39:in `block (3 levels) in render!'
	23: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
	22: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
	21: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
	20: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
	19: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:in `render'
	18: from /home/sfunk1x/gems/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
	17: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/tags/highlight.rb:41:in `render'
	16: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/tags/highlight.rb:82:in `render_rouge'
	15: from /home/sfunk1x/gems/gems/jekyll-4.2.0/lib/jekyll/tags/highlight.rb:82:in `require'
	14: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge.rb:69:in `<top (required)>'
	13: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge.rb:53:in `load_lexers'
	12: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge.rb:53:in `each'
	11: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge.rb:54:in `block in load_lexers'
	10: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge/lexer.rb:532:in `load_lexer'
	 9: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge/lexer.rb:532:in `load'
	 8: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge/lexers/lasso.rb:4:in `<top (required)>'
	 7: from /home/sfunk1x/gems/gems/rouge-3.26.0/lib/rouge/lexers/lasso.rb:4:in `require'
	 6: from /usr/lib/ruby/2.7.0/yaml.rb:4:in `<top (required)>'
	 5: from /usr/lib/ruby/2.7.0/yaml.rb:4:in `require'
	 4: from /usr/lib/ruby/2.7.0/psych.rb:20:in `<top (required)>'
	 3: from /usr/lib/ruby/2.7.0/psych.rb:20:in `require'
	 2: from /usr/lib/ruby/2.7.0/psych/parser.rb:2:in `<top (required)>'
	 1: from /usr/lib/ruby/2.7.0/psych/parser.rb:33:in `<module:Psych>'
/usr/lib/ruby/2.7.0/psych/parser.rb:34:in `<class:Parser>': superclass mismatch for class Mark (TypeError)

If you google superclass mismatch for class Mark you’ll find some random Ruby issues with that same error and it seems like they fixed it and merged it into ruby 2.7 which is what it looks like you have. Though maybe you need an incrementally higher version of 2.7?

A common thing that seems to happen is that people end up with 2 ruby installs and then the commands seem to bounce back and forth.

It looks like you may have ruby in both these locations? maybe uninstall ruby and then re-install?

/usr/lib/x86_64-linux-gnu/ruby/2.7.0/
/usr/lib/ruby/2.7.0/

I’m not a nix user so I don’t understand the OS structure so I could be wrong but worth a shot. though if you use ruby for something else then maybe think twice before uninstalling it.

That was the issue. I purged everything ruby related then reinstalled via rvm. Working smoothly now. Thank you!