# Liquid Exception: uninitialized constant Jekyll::Utils::Rouge

**URL:** <https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696>\
**Category:** Help\
**Created:** [March 3, 2019, 6:06am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696 "2019-03-03T06:06:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 3, 2019, 6:06am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/1 "2019-03-03T06:06:13Z")

</div>

The title is the error I get when I try ‘jekyll build’

I haven’t done anything on my blog since last November, so after I got the error on my first build I tried ‘bundle update’ and repeated the build command. Nothing changed.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 3, 2019, 6:49am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/2 "2019-03-03T06:49:38Z")

</div>

Can you run `jekyll build --trace` and paste the output here?

Do you have rouge installed?

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 3, 2019, 9:37am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/3 "2019-03-03T09:37:37Z")

</div>

I installed rouge.  
No change in result.  
Here the trace output:  
/var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/drops/document\_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED\_OBJECT\_FIELD\_BLACKLIST  
/usr/lib/ruby/vendor\_ruby/jekyll/drops/document\_drop.rb:8: warning: previous definition of NESTED\_OBJECT\_FIELD\_BLACKLIST was here  
/var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON\_CONTENT\_METHODS  
/usr/lib/ruby/vendor\_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON\_CONTENT\_METHODS was here  
Configuration file: /home/bob/Documents/Webpages/Jekyll/blog/\_config.yml  
Source: /home/bob/Documents/Webpages/Jekyll/blog  
Destination: /home/bob/Documents/Webpages/Jekyll/blog/\_site  
Incremental build: disabled. Enable with --incremental  
Generating…  
Liquid Exception: uninitialized constant Jekyll::Utils::Rouge Did you mean? Rouge in /home/bob/Documents/Webpages/Jekyll/blog/\_posts/2018-05-07-welcome-to-jekyll.markdown  
Traceback (most recent call last):  
32: from /usr/local/bin/jekyll:23:in `<main>' 31: from /usr/local/bin/jekyll:23:in`load’  
30: from /var/lib/gems/2.5.0/gems/jekyll-3.7.4/exe/jekyll:15:in `<top (required)>' 29: from /usr/lib/ruby/vendor_ruby/mercenary.rb:19:in`program’  
28: from /usr/lib/ruby/vendor\_ruby/mercenary/program.rb:42:in `go' 27: from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in`execute’  
26: from /usr/lib/ruby/vendor\_ruby/mercenary/command.rb:220:in `each' 25: from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in`block in execute’  
24: from /var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program' 23: from /var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/build.rb:36:in`process’  
22: from /var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/build.rb:65:in `build' 21: from /usr/lib/ruby/vendor_ruby/jekyll/command.rb:26:in`process\_site’  
20: from /usr/lib/ruby/vendor\_ruby/jekyll/site.rb:59:in `process' 19: from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:168:in`render’  
18: from /usr/lib/ruby/vendor\_ruby/jekyll/site.rb:168:in `each' 17: from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:169:in`block in render’  
16: from /usr/lib/ruby/vendor\_ruby/jekyll/site.rb:169:in `each' 15: from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:171:in`block (2 levels) in render’  
14: from /usr/lib/ruby/vendor\_ruby/jekyll/renderer.rb:61:in `run' 13: from /usr/lib/ruby/vendor_ruby/jekyll/renderer.rb:106:in`render\_liquid’  
12: from /usr/lib/ruby/vendor\_ruby/jekyll/liquid\_renderer/file.rb:26:in `render!' 11: from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:43:in`measure\_time’  
10: from /usr/lib/ruby/vendor\_ruby/jekyll/liquid\_renderer/file.rb:27:in `block in render!' 9: from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:36:in`measure\_bytes’  
8: from /usr/lib/ruby/vendor\_ruby/jekyll/liquid\_renderer/file.rb:28:in `block (2 levels) in render!' 7: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/template.rb:220:in`render!’  
6: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/template.rb:207:in `render' 5: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/template.rb:242:in`with\_profiling’  
4: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/template.rb:208:in `block in render' 3: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/block_body.rb:82:in`render’  
2: from /var/lib/gems/2.5.0/gems/liquid-4.0.1/lib/liquid/block\_body.rb:102:in `render_node_to_output' 1: from /var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/tags/highlight.rb:43:in`render’  
/var/lib/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/tags/highlight.rb:114:in `render\_rouge’: uninitialized constant Jekyll::Utils::Rouge (NameError)  
Did you mean? Rouge

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 3, 2019, 10:59am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/4 "2019-03-03T10:59:59Z")

</div>

@bob.parker Does running `bundle exec jekyll build` help? If not, please post the link to your repository.

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 3, 2019, 11:12am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/5 "2019-03-03T11:12:53Z")

</div>

bundle exec jekyll build  
gives the same error:  
Liquid Exception: uninitialized constant Jekyll::Utils::Rouge Did you mean? Rouge in /home/bob/Documents/Webpages/Jekyll/blog/\_posts/2018-05-07-welcome-to-jekyll.markdown  
jekyll 3.1.6 | Error: uninitialized constant Jekyll::Utils::Rouge

Here is the link to my blog:  
[https://rlp1938.github.io/blog/](https://rlp1938.github.io/blog/)  
Of course this was generated when my system was working.  
Thanks.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 3, 2019, 11:41am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/6 "2019-03-03T11:41:52Z")

</div>

I cloned your blog’s repo at [https://github.com/rlp1938/blog](https://github.com/rlp1938/blog) and tried building **as is** …  
There was **no error.**

```nohighlight
$ git clone https://github.com/rlp1938/blog.git bobs_blog
$ cd bobs_blog
$ bundle install
$ bundle exec jekyll build

```

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 3, 2019, 11:56am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/7 "2019-03-03T11:56:18Z")

</div>

Thank you for your effort on this.  
I recall now that I had a forced restore of my home directory between my last successful blog and now. So it looks like there has been some ‘bit rot’ of what was restored.

I don’t have a lot of practical knowledge of Ruby or of the other software involved so I don’t really know what next steps I should take to remedy the situation.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 3, 2019, 11:59am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/8 "2019-03-03T11:59:07Z")

</div>

The issue could be from `/usr/lib/ruby/vendor_ruby/jekyll/`  
Move into the location `/usr/lib/ruby/vendor_ruby/` and delete the `jekyll` directory there.

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 3, 2019, 12:41pm UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/9 "2019-03-03T12:41:03Z")

</div>

I deleted `/usr/lib/ruby/vendor\_ruby/jekyll/  
and reinstalled from the xubuntu repo

Then did gem update which took some time.  
then: gem install bundler

results

1. jekyll build  
Traceback (most recent call last):  
10: from /usr/local/bin/jekyll:23:in `<main>' 9: from /usr/local/bin/jekyll:23:in`load’  
8: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/exe/jekyll:8:in `<top (required)>' 7: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in`require’  
6: from /usr/lib/ruby/2.5.0/rubygems/core\_ext/kernel\_require.rb:59:in `require' 5: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll.rb:200:in`\<top (required)\>’  
4: from /usr/lib/ruby/2.5.0/rubygems/core\_ext/kernel\_require.rb:59:in `require' 3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in`require’  
2: from /usr/lib/ruby/vendor\_ruby/jekyll-sass-converter.rb:4:in `<top (required)>' 1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in`require’  
/usr/lib/ruby/2.5.0/rubygems/core\_ext/kernel\_require.rb:59:in `require’: cannot load such file – jekyll/converters/scss (LoadError)

2. bundle exec jekyll build  
Traceback (most recent call last):  
2: from /home/bob/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>' 1: from /home/bob/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in`activate\_bin\_path’  
/home/bob/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException) Traceback (most recent call last): 2: from /home/bob/.rbenv/versions/2.5.1/bin/bundle:23:in`’  
1: from /home/bob/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path' /home/bob/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in`find\_spec\_for\_exe’: can’t find gem bundler (\>= 0.a) with executable bundle (Gem::GemNotFoundException)

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 3, 2019, 2:18pm UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/10 "2019-03-03T14:18:01Z")

</div>

> [@bob.parker](#):
>
> reinstalled from the xubuntu repo

I don’t know why you had to reinstall but typically `lib/ruby/vendor_ruby/` does not contain `jekyll` nor any of its dependencies and other jekyll plugins. It is not required for the proper functioning of Ruby.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 3, 2019, 5:16pm UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/11 "2019-03-03T17:16:59Z")

</div>

maybe you have 2 versions of ruby installed?

this seems suspicious to me - but I am not very knowledgeable of ruby:

`.rbenv/versions/2.5.1/lib/ruby/2.5.0`

is it 2.5.0 or 2.5.1?

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 4, 2019, 12:25am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/12 "2019-03-04T00:25:57Z")

</div>

I’m in the same boat about Ruby.  
The path you show is the same on my system.  
I think I am at the point where I’ll do a full system search for everything Ruby and purge the lot and start over with the installation of it all.

---

<div class="post-metadata">

**Author:** ![bob.parker](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bob.parker](https://talk.jekyllrb.com/u/bob.parker)\
**Post date:** [March 7, 2019, 7:58am UTC](https://talk.jekyllrb.com/t/liquid-exception-uninitialized-constant-jekyll-rouge/2696/13 "2019-03-07T07:58:30Z")

</div>

I did purge and re-install everything.  
I had to install a few gems in addition and finally it is working.  
I do still have a problem using the --watch switch though I have installed the required gem.  
I will close this and treat --watch as a separate issue.
