From: Christopher Baines <mail@cbaines.net>
To: Divan Santana <divan@santanas.co.za>
Cc: help-guix@gnu.org
Subject: Re: using guix for ruby development
Date: Sun, 18 Feb 2018 15:15:29 +0000 [thread overview]
Message-ID: <87tvuel46m.fsf@cbaines.net> (raw)
In-Reply-To: <877eretnuw.fsf@santanas.co.za>
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
Divan Santana <divan@santanas.co.za> writes:
> Divan Santana <divan@santanas.co.za> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
next prev parent reply other threads:[~2018-02-18 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 12:46 using guix for ruby development Divan Santana
2018-02-15 12:54 ` Divan Santana
2018-02-16 18:44 ` Marius Bakke
2018-02-23 13:33 ` Divan Santana
2018-02-18 15:15 ` Christopher Baines [this message]
2018-02-23 13:42 ` Divan Santana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvuel46m.fsf@cbaines.net \
--to=mail@cbaines.net \
--cc=divan@santanas.co.za \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.