user2838784 user2838784 - 1 year ago 102
Ruby Question

Error installing jekyll on ubuntu 14.04

After executing

sudo gem install jekyll --no-rdoc --no-ri

I get the following error

ERROR: Error installing jekyll:
jekyll requires Ruby version >= 2.0.0.

but when I check the version of ruby installed I get 2.3.0

ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

and when I check the version of ruby in /usr/bin is 1.9.3

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

How do I use the same version of ruby in the whole system?

Answer Source

You have a system ruby at 1.9.3 and 2.3.0 installed with some version manager.

When you call sudo ruby or sudo gem install that's using the system Ruby.

If you just use ruby or gem install that will use the version manager.

In short, just use gem install jekyll --no-rdoc --no-ri without the sudo.