ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /var/lib/gems/2.7.0 directory.
ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /var/lib/gems/2.7.0 directory.
Share
You first need to uninstall the ruby installed by Ubuntu with something like
sudo apt-get remove ruby
.Then reinstall ruby using rbenv and ruby-build according to their docs:
Now we will install rbenv (recommended, see docs)
The last step is to install Bundler:
Then enjoy!