c4k c4k - 1 year ago 219
Ruby Question

"listen" conflict when installing Jekyll with Docker

I am trying to install Jekyll in a

extending the Jenkins official image (2.19.1)

The following commands :

RUN apt-get install -y ruby-full rubygems
RUN gem install jekyll

produce the following error :

Step 2 : RUN gem install jekyll
---> Running in 197cb23c8bce
Successfully installed liquid-3.0.6
Successfully installed kramdown-1.12.0
Successfully installed mercenary-0.3.6
Successfully installed safe_yaml-1.0.4
Successfully installed colorator-1.1.0
Successfully installed rouge-1.11.1
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
"listen" from listen conflicts with installed executable from sass-listen
Successfully installed ffi-1.9.14
Successfully installed rb-inotify-0.9.7
Successfully installed rb-fsevent-0.9.7
Successfully installed sass-listen-3.0.7
Successfully installed sass-3.5.0.pre.rc.1
Successfully installed jekyll-sass-converter-1.4.0

Has anyone faced the same error ? How to fix ?

c4k c4k
Answer Source

The error is due to a bad ruby version for listen :

IMPORTANT: Ruby 2.1 is officially outdated and unsupported! Please upgrade to Ruby 2.2.5 before installing Listen!

The ruby version installed by the package manager is ruby-2.1. So I ended up installing Ruby via RVM :

RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
    && curl -sSL https://get.rvm.io | bash -s stable --ruby --gems=jekyll

It installs ruby-2.3 and jekyll and it works like a charm.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download