Date: Mon, 25 Jan 2021 10:26:50 -0700 From: Gary Aitken <freebsd@dreamchaser.org> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: ruby pkg and user gem/bundle privilege mismatch Message-ID: <9c121e6b-f6d3-0734-22e3-16a7ad6dda72@dreamchaser.org>
next in thread | raw e-mail | index | archive | help
Some time ago I installed ruby vi pkg install (as root). Now working in my normal user account, I run into privilege violations when trying to do a bundle install: Errno::EACCES: Permission denied @ rb_file_s_rename - (/home/me/.gem/ruby/2.6/cache/rake-13.0.3.gem, /usr/local/lib/ruby/gems/2.6/cache/rake-13.0.3.gem) An error occurred while installing rake (13.0.3), and Bundler cannot continue. Make sure that `gem install rake -v '13.0.3' --source 'https://rubygems.org/'` succeeds before bundling. gem install rake -v '13.0.3' --source 'https://rubygems.org/' ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/local/lib/ruby/gems/2.6 directory. This is all true... However, there is a /home/me/.gem/ruby/2.6/cache/rake-13.0.3.gem Is this a path issue, or some larger privilege issue? /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/local/libexec:/home/me/bin I installed rails as root using "gem install rails --version '=5.2.4' What's the difference between a pkg install of rails and "rem install"? Is it possible to mix a system ruby installation and user gem installs? Do I need to install rvm in order to do that? Gary
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9c121e6b-f6d3-0734-22e3-16a7ad6dda72>