Date: Mon, 25 Jan 2021 18:47:33 +0100 From: Tomasz CEDRO <tomek@cedro.info> To: freebsd@dreamchaser.org, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: ruby pkg and user gem/bundle privilege mismatch Message-ID: <e58efa18-3f79-997f-a93a-7ef7e53707a3@cedro.info> In-Reply-To: <9c121e6b-f6d3-0734-22e3-16a7ad6dda72@dreamchaser.org> References: <9c121e6b-f6d3-0734-22e3-16a7ad6dda72@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 25.01.2021 18:26, Gary Aitken wrote: > (..) > 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? Not sure about ruby but in Python you have system wide packages that you install as root and you can use them but not modify as standard user. Alternatively, you can install you own local Python Virtual Environment (venv) as standard user, so you can get independent working environment that does not depend nor modify the system packages (except you only need Python and VENV packages). You can then modify that local venv as standard user, add new packages, remove packages, etc. You can even have multiple different virtual environments separated for a different tasks (i.e. django web development, zephyr embedded environment, etc). Summing up you should never install local packages as root to use them as standard user. You should rather create your own small virtual environment that you can fully control as standard user with no impact to the system (or when you cannot modify system for instance on the shared hosting environment). This may come helpful: https://stackoverflow.com/questions/486995/ruby-equivalent-of-virtualenv Best regards :-) Tomek -- CeDeROM, SQ7MHZ, https://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e58efa18-3f79-997f-a93a-7ef7e53707a3>