From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: using guix for ruby development Date: Sun, 18 Feb 2018 15:15:29 +0000 Message-ID: <87tvuel46m.fsf@cbaines.net> References: <87a7wato8i.fsf@santanas.co.za> <877eretnuw.fsf@santanas.co.za> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enQgj-0001SB-ML for help-guix@gnu.org; Sun, 18 Feb 2018 10:15:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enQgg-0008Ap-EL for help-guix@gnu.org; Sun, 18 Feb 2018 10:15:37 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:41264 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enQgg-0008Af-78 for help-guix@gnu.org; Sun, 18 Feb 2018 10:15:34 -0500 In-reply-to: <877eretnuw.fsf@santanas.co.za> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Divan Santana Cc: help-guix@gnu.org --=-=-= Content-Type: text/plain Divan Santana writes: > Divan Santana writes: >> Is there a simple way of getting these gems installed to use guix system >> libs so things don't break? > > So for this particular project I managed to get it working via changing > the Gemfile to up the version on nokogiri to 1.8 so I can use the > nokogiri from guix. Did the same with ffi which had similar issue. > > That's not ideal as one may need a diff version or the gem may not be > packaged yet. > > Any thoughts? I've been putting up with using bundler and rubygems for a little while now, although I'd still like to switch to only using Guix packages one day. My current workflow when I use Bundler/Rubygems is to using Guix to provide the right version of Ruby, and then Direnv to setup the environment. This would be a .envrc file that would work for nokogiri. use guix --ad-hoc ruby@2.3 gcc-toolchain pkg-config libxml2 libxslt layout ruby To use this, you'd need to create a file called .envrc with the above 2 lines, and then run direnv allow to allow it to be loaded. After it loads, assuming you're using bundler, you should run gem install bundler. This works better than using the Guix package for bundler, as that uses a specific Ruby version, which might not be the one you've specified in the environment. After bundler is installed, run bundle install. When things break, which they will, I just rm -rf .direnv, and start again. So, in summary. # create the .envrc file direnv allow gem install bundler bundle --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlqJmJFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeXxw//dtI1iOBTiBthGG8x8EKkkCcfE0UXVoHJQ313+FrnpzKFz/RlNAayD/l2 tMY+2AZgYYoPu7ztylm0c6I5QbrqYrpOorPjeAXZa6jMqyHbF8FJx3OcEdXfuY95 vOH8CLSrqYKB/BWC8X5W5b/GlbBIO+/ghX3hfqw06pfrUaQelzcELBEGr3hg1dyz zqZ5gb/iVOxjyX7V39/4jlU5ZCpP9lx8UH2lDQ8CfAoiK1KzwZn91uNv8RG6B7Z2 jFGXjGYRzOTlZqltYgdSx77Vt4GARS0MU3Y4qSx9T4vTDVeCdhC1+MWFLw39XZBP r9Hdn3AlQwL6WTGrS8EzAqc7kESTdfkCTG4qCnw4F2+znSD0XgRdqKKWYLtZ0tzT cLWoaYl+ekhGJhI21NTe1qBDDM7W8b3CKyiFTdfybglI7+ETV8MHcGWq9bD1IsHv RQD3MF3mE9wip2yFD0Dts5jATqNAcZDzz41TrZYOd7dFH4kBDvpHfS0/xW7oRRkG +zCwT2UNaU+Z1jA7skelwFZOPn7R+o3nAHsM6P0I2hVcHlLY4YzfF3DjtQINikm6 fWv2DDzsJ+YwgAankgnsxBQQgX0siejvJ6d0DKdLxqPSPJlV37S3MqMleQu9G8ts X1gZddj1iRkZNCjJIEtXRoL7s4fGrIQjHN2LFF5j/qV3o60jsn8= =omsc -----END PGP SIGNATURE----- --=-=-=--