From owner-freebsd-questions@freebsd.org Mon Jan 25 17:47:36 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C33D4EA902 for ; Mon, 25 Jan 2021 17:47:36 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DPclC4sk5z4ldv for ; Mon, 25 Jan 2021 17:47:35 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-lj1-x22e.google.com with SMTP id l12so13821789ljc.3 for ; Mon, 25 Jan 2021 09:47:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UugHCyHbnXtamOGgJrptwxZ5+mYR1kMnHsfmCNIDh4k=; b=S+wPGSg5mQHltjTVxNNDMFwG53geckU6AZc3JiFsQx9foCyDMCSN6GsWX+iv6VCtB/ j2NteL92uGe69EamrUnNjs6eiqi4OiApLjQliiwAUq/uai/yPqE8TnIpp8R+r2EGEXx4 nXDAnfzgEF0pfkiYdmTjYEuM4swMlINB4ibgj+Q69RYl2cPenUrabnyazp1BsID8Sz+g wEBiixTwQTLEK+2vGJVTmTxHmpYVo0xkDt9th2I7nzlDKSyNogu+TWMBj7+Zro25+Z4+ /SX/dP/2832rNJ8L1un5LGEA6evW4oi3vNvQ+k0OvyUn30UBwqnB2lWFAUFiWKUCy2/M QUCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UugHCyHbnXtamOGgJrptwxZ5+mYR1kMnHsfmCNIDh4k=; b=h9YsY0dvg+RWyjbXHjfOvVGlxykops9KZTGecJ/9hUaM55z7v5Cf60AzyAotx6ohda TEJJmDUxc40SSTmT52E3zS8XamDuPAI9InBPnUJkE9HKY5GIWvJNvnYk+lZJ7WCaeYzz ae/WH0JCgNyQv6sFy/Hdp8zSZbGUpbd06dx9WRd7KPACIBN3TESeUzMayyUyqdYzG93C +nZo6DjwYFYPtjlJsJ92anhAk8m37XdeCTvYZZTz3csKiqwMFPDUsNp3YkgC8Kh9fpiT nGOSEOTOdno5oH4Ew2QRPkRSGIRfCoUWsiVflb/q1qr3vWR/jzjRa3C2F290Qs35ZXBl XD7g== X-Gm-Message-State: AOAM531nXLmq1Oww1m/oMWXkZe4e31wiKtHhcAlhrKAX7Bcps/v5hpYp KOIQKRP7pSiqpJ32Ni4MENweUzYzuTRDLt3f X-Google-Smtp-Source: ABdhPJw0W396YJ78qB5FHBA/oZaotC1eegq84Y37MzWoCv7icLLDmFf1I2GnfNfjRxQMUXoO36Ryzw== X-Received: by 2002:a05:651c:103c:: with SMTP id w28mr746103ljm.186.1611596853854; Mon, 25 Jan 2021 09:47:33 -0800 (PST) Received: from [192.168.0.101] ([31.179.178.250]) by smtp.gmail.com with ESMTPSA id p21sm2024982lfu.227.2021.01.25.09.47.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jan 2021 09:47:33 -0800 (PST) Subject: Re: ruby pkg and user gem/bundle privilege mismatch To: freebsd@dreamchaser.org, FreeBSD Mailing List References: <9c121e6b-f6d3-0734-22e3-16a7ad6dda72@dreamchaser.org> From: Tomasz CEDRO Organization: CeDeROM Message-ID: Date: Mon, 25 Jan 2021 18:47:33 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <9c121e6b-f6d3-0734-22e3-16a7ad6dda72@dreamchaser.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DPclC4sk5z4ldv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=S+wPGSg5; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2a00:1450:4864:20::22e) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[cedro.info:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::22e:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[cedro.info]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::22e:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22e:from]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2021 17:47:36 -0000 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