Can't create new site via "jekyll new SITE"

Hello! When I try create new site via jekyll new SITE I obtain this error:

Running bundle install in /home/emilyseville7cfg/Documents/mine/md/myblog... 


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

      bundle config set --local path 'vendor/bundle'
      bundle install

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

  Password: 

I don’t understand why it happens. I have all prerequisites installed:

~ Thu 03:51💲ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
~ Thu 03:51💲gem --version
3.1.2
~ Thu 03:51💲gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~ Thu 03:51💲g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~ Thu 03:51💲make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

My OS: Linux Mint 20.2 Cinnamon
My PATH: /home/emilyseville7cfg/gems/bin /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/sbin /home/emilyseville7cfg/.local/share/nvm/v16.11.1/bin /home/emilyseville7cfg/.local/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /snap/bin.

As the error message states it is not able to install gems on your current path, and being the ruby version installed as standard packages it is trying to install gems under your /usr/…/gems/ path, failing because that’s a root domain path.

As the message suggests install bundle and execute the configuration command, after that you should be able to run without problems any Jekyll command like that:
bundle exec jekyll <command> <params>...

Highly recommended to install ruby using rvm or chruby without removing the standard system install.

1 Like

Maybe this Jekyll template will help somebody. Thanks! :wink:

1 Like