From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aLbeOUhGbWZzTwAA62LTzQ:P1 (envelope-from ) for ; Sat, 15 Jun 2024 07:44:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aLbeOUhGbWZzTwAA62LTzQ (envelope-from ) for ; Sat, 15 Jun 2024 09:44:09 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=remworks.net header.s=fm3 header.b=UTH0XdCX; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=ijmgIyFY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718437448; a=rsa-sha256; cv=none; b=BAtlipPamxA28otbdtKoEy2ziEZeO44V15pq4Gv2yM8sGLVjHxtdlaw+pa5hPxZHkVKJlp IAJMto9ivUK3sjDVdGrqURXqbzCotBobmD1/gS9amS/EGGD58sSeAluhR/wlVonIiyunar GXR2qwFwFo02cNKk3aN5YKD4+Dv+1ctZ7oVEJw2+nUgBepVAkXsb/R3FGef4srgvqfqKVj sQpn005U8PWU7siUYwhejXzeeJQOpUOZMNSYP10yUl9Thl2tipLysnKSZUiTHyX0kGfy+o fcvUaKDCIR5XOPEUUKrp2Yb0VR4RuYv/ubpyE71BSFYh08hfT9ieqIbLkK/KMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=remworks.net header.s=fm3 header.b=UTH0XdCX; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=ijmgIyFY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718437448; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=RE+yEUf73S8LH8pS/yZsHl31/eQRiaTAgiuU2vRAFBY=; b=R6y4d95p+rEniUNa8BaOKHVCGe3DeZ/hft8qBiv5VxpRWN3FDZA5sLGRyyHbz13fKObNq5 kDY7nWwPWhzWBamoHOtyoM/+B55ahuAH1QBI9Brqzui/pKwRg6ZrGZJh2deyahqMu2EpJv 7fy090quDfac7VttHu/7/JhJV68sHbmR/UcpwLPD0WlAlcPiAicXHIepcHUN6Shh5Ii3g1 6NMrfHRdrhu3kud2Yc94PR8QemsvFUjmMDf045Pwf2PJBuI8BxZazFz/HHIUyi1P5VGr7a iRqlpxpgR3VG67mGBrbLPQG9PPqpnWhpEVAluiaiLMJnxtthN3//qRytUkKv3g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2EFC6334BD for ; Sat, 15 Jun 2024 09:44:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIO4d-0005Vx-Vs; Sat, 15 Jun 2024 03:43:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIO4c-0005Vo-5k for help-guix@gnu.org; Sat, 15 Jun 2024 03:43:42 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIO4Z-0005Jb-TA for help-guix@gnu.org; Sat, 15 Jun 2024 03:43:41 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 4C3EC13803DD; Sat, 15 Jun 2024 03:43:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 15 Jun 2024 03:43:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=remworks.net; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1718437417; x=1718523817; bh=RE+yEUf73S 8LH8pS/yZsHl31/eQRiaTAgiuU2vRAFBY=; b=UTH0XdCXjAsA5tMFJzALcALv1w Ecm8AUjEbkrPE8FvgwGYAentx7UqeNUmBZDhEY54zPQwe/q4Y7uau4CaTZYVrwgG j6k9hHvp785z+ToKN/A5MPJT5CrcJ9IGZHpXyUhvCr03eZKsF+50ys6rCS1U5L9O XmMxZ5Us+RY75EbDyXB80RxJUAE2Yb0zH6tQTGKJh1lolAEt6JZoAfCJ+thXqr2H +gm3d8fb1BM4u04wbAz6N7Gg4Uy91RxaqMzdyG9tywUBbrEERFDaPChaj42hsoiJ QCsWOtdR3snDNF6Z3SE3U3/Moz6kVpxDjOLeo9OKwgHWmbQdPOxoIO3tbwoQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1718437417; x=1718523817; bh=RE+yEUf73S8LH8pS/yZsHl31/eQR iaTAgiuU2vRAFBY=; b=ijmgIyFYfyHoh3nwb0PCEGLNUhsnnY5JaJhK6cXBy4LZ Z0rF5wKw12F7Mfjlent5337ZtPE+hR9CUoUVvyTpxy1SDcFpJ6uztNmJFa0kClWK YLGocBePbx2nUQvwfyKKGl8HHaM5gYwVwQdGiUNt3sFXxBAr/do8YYr51PwUu740 hUIcf3SyXe9MexHB7513MmstbUEH01YLN1sb5Uw8Sc9TU3rOTgZHdNtIvOF9V24m mLUqchE9j35NNVCQEz6lQZqSN/qAiSyBkugn4DV8vVsmyL8n5jAsHvQQVP7UB1LM d2+OvW8R0Z/UPTm33umWHUHznguRvJZJmRSlGZxfgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvtddguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpeftvghm tghouchvrghnucdkthcugggvvghruceorhgvmhgtohesrhgvmhifohhrkhhsrdhnvghtqe enucggtffrrghtthgvrhhnpeetgfeutdejheeifeffgfegkeffffduleehvefhffeiueef gfeijeeuteeufeefleenucffohhmrghinheprhhusgihqdhlrghnghdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvghmtghosehr vghmfihorhhkshdrnhgvth X-ME-Proxy: Feedback-ID: if0694934:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Jun 2024 03:43:36 -0400 (EDT) From: Remco van 't Veer To: Daniel Littlewood Cc: help-guix Subject: Re: Ruby without RVM - what to do if the version I want is missing? In-Reply-To: (Daniel Littlewood's message of "Fri, 14 Jun 2024 16:43:05 +0100") References: User-Agent: mu4e 1.12.4; emacs 29.3 Date: Sat, 15 Jun 2024 09:43:33 +0200 Message-ID: <87y176ejmi.fsf@remworks.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.144; envelope-from=remco@remworks.net; helo=fout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 2EFC6334BD X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.48 X-Spam-Score: -8.48 X-TUID: CYyzsnEvf6x0 Hi Daniel, I replaced rvm on guix with direnv and guix manifests. Most for the projects I work on are on different versions of ruby and some which are not packaged for guix. The way I do this is as follows. First I create a .guix.scm file in the root of my project as follows: (use-modules (gnu packages) (gnu packages ruby) (guix packages) (guix utils)) (let* ((ruby-version "3.3.0") (ruby (package (inherit ruby-3.2) (version ruby-version) (source (origin (inherit (package-source ruby-3.2)) (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" (version-major+minor ruby-version) "/ruby-" ruby-version ".tar.xz")) (sha256 (base32 "0nwpgf27i43yd8ccsk838n86n9xki68hayxmhbwr0zk3dsinasv7"))))))) (concatenate-manifests (list (packages->manifest (list ruby)) ;; base for building extensions (package->development-manifest ruby)))) And run: guix package -p .guix -m .guix.scm This creates a profile containing ruby-3.3.0 in the .guix directory (with is actually a link the a version of that profile) which includes enough to build basic gems with native code (the development manifest for ruby itself) kinda like installing debians build-essentials. If you need any libraries to compile some gem add them here too. Now create a .envrc file as follows: GUIX_PROFILE="$(expand_path .guix)" [ -f "$GUIX_PROFILE/etc/profile" ] || guix package -p "$GUIX_PROFILE" -m .guix.scm source "$GUIX_PROFILE/etc/profile" export GEM_HOME="$(expand_path .gems)" export GEM_PATH="$GEM_HOME" PATH_add $GEM_HOME/bin This makes sure the profile gets automatically loaded when you "enter" the project and sets up GEM_HOME so all gems installed for this project are kept in the local .gems. Read the direnv documentation to figure out how to set that up to make "entering" the project work for your dev environment. I use the envrc emacs package which work very well for me. I use the about method for other kinds of projects too. Cheers, Remco