[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using guix for ruby development

From: Christopher Baines
Subject: Re: using guix for ruby development
Date: Sun, 18 Feb 2018 15:15:29 +0000
User-agent: mu4e 0.9.18; emacs 25.3.1

Divan Santana <address@hidden> writes:

> Divan Santana <address@hidden> 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

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

This would be a .envrc file that would work for nokogiri.

  use guix --ad-hoc address@hidden 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

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]