First installation, first problem

I discovered jekyll: please apologize my crazy questions …
I tried to install it on Debian Buster.
I did:
$ sudo apt-get install ruby-full build-essential

$ gem install jekyll bundler
as explained in the doc.
I have the following message:

Fetching: public_suffix-4.0.5.gem (100%)
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /var/lib/gems/2.5.0 directory.

Does it mean I shall install as root ?


If you have Ruby installed in your /var directory and don’t have write permissions there, you could use sudo gem install <gem-name>. That will probably require you to use sudo every time you do anything with your site.

An alternative might be to use rbenv from your /home directory. The instructions for installing on GoRails, are pretty good.

Does it mean that the doc is wrong ?

Next step: jekyll new myblog

Your user account isn’t allowed to install to the system RubyGems.
You can cancel this installation and run:

  bundle install --path vendor/bundle

to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.


Does it mean that the doc is still wrong …
or something is missing

The docs aren’t wrong, it’s just that might not be the best way to run your projects.

There is an question on Stack Overflow that might be useful. The second answer is basically what I was suggesting in this thread, but there is a lot of useful info in that thread.