0

I am completely new to Linux and want to write a website in Yekyll. therefore I have to install Ruby first. Unfortunately this does not work properly. As far as I can see, I do not have the correct rights for Ruby. but I already set the rights to rwx. So I cannot see what else I can do. Can anybody help me please?

Here is what I did and received:

    raphael@raphael-ThinkCentre-M58:~$ gem install jekyll bundler
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.5.0 directory.
    raphael@raphael-ThinkCentre-M58:~$ 
    raphael@raphael-ThinkCentre-M58:~$ sudo ls -al /var/lib/gems/2.5.0
    [sudo] password for raphael:              
    total 32
    drwxr-xr-x 8 root root 4096 Nov 17 10:08 .
    drwxr-xr-x 3 root root 4096 Nov 17 09:51 ..
    drwxr-xr-x 2 root root 4096 Nov 17 10:08 build_info
    drwxr-xr-x 2 root root 4096 Nov 17 10:25 cache
    drwxr-xr-x 3 root root 4096 Nov 17 10:08 doc
    drwxr-xr-x 3 root root 4096 Nov 17 10:25 extensions
    drwxr-xr-x 7 root root 4096 Nov 17 14:48 gems
    drwxr-xr-x 2 root root 4096 Nov 17 10:25 specifications

This is much to small to give it to a professional, but never the less it stops my working since two days. :(

Any ideas? Thanks!

rabox66
  • 149
  • 2
  • 10
  • https://stackoverflow.com/questions/2619695/gem-install-permission-problem/2619731 – Bert Nov 18 '20 at 14:27
  • does this answer your question? https://stackoverflow.com/questions/37720892/you-dont-have-write-permissions-for-the-var-lib-gems-2-3-0-directory – zhisme Nov 18 '20 at 15:26
  • You are trying to install libraries globally, which is giving those issues. Try using `rvm` or `rbenv` to install them into a separate directory, per project. There are step-by-step how-to's on how to install and use `rvm` within minutes. – Igor Nov 18 '20 at 20:24

0 Answers0