[Nix-dev] Re: Ruby-gems

Aaron VonderHaar gruen0aermel at gmail.com
Sun Aug 3 22:56:48 CEST 2008


As far as users installing gems, they should be installing them  
locally and not into the nix store, and the standard place to put them  
is ~/.gems

% gem install [name of gem] --install-dir="$HOME/.gems"
% export GEM_PATH="$HOME/.gems"

As for system-wide gems, I wonder if it might not be appropriate to  
add a configuration option to the ruby or gems package which lists a  
set of gems to install, just as nixos has  
"environment.extraPackages".  The gems package could then install all  
the necessary gems as the last step of its install process, and the  
result would be unique to it's hash.

I'm thinking of this from a perspective of having web-development  
testbeds, where it would be nice to have independent ruby packages  
with, for example, different versions of rails or different sets of  
gems installed and be able to select among them using a single  
identifier.

Cheers,
--Aaron V.


On Aug 3, 2008, at 12:07, Michael Raskin wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Bárður Árantsson wrote:
> |>> My problem is that I want to provide Ruby to biologists, and can  
> not
> |>> support all GEMs they will think of.
> |>
> |> I still think that a wrapper that is a combination of Ruby plus  
> all the
> |> gems you need for a certain package would be sufficient. Maybe we  
> should
> |> just sit together for a few hours to just see if we can get it  
> fixed
> |> without too much effort.
> |
> | The problem with executable wrappers is that the don't scale: You  
> need a
> | wrapper for every conceivable combination of GEMs/Eggs/whatever...  
> which
> | is impractical.
>
> Well, you never need to have all wrappers created at once. You  
> generally
> have no more than one per environment generated automatically, and  
> that
> results in some sane amount of wrappers. Maybe add a few that are used
> internally in some builds.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iQEcBAEBAgAGBQJIlgIHAAoJEE6tnN0aWvw3zQ0H/iDaXDtUaxEQSOHKo3pMyG5/
> XRGdv5l9h7fwgOlRch3egDPuREtQadTfPAvoLxMxFWZQTNHS0Vg2NAKf0V4r1i1S
> +mtr+ztQt7DGcvD7NOSFhrh2d7YDryJ2kSByngTPAvajiv1l2cPxAYJBULT5TYVK
> 8Pu86JKfN9dwwI5maMliXuuEeczg82s1MndkxJQvfW7ApqD9M1NwO83+UnNEFHSx
> vxNHJR0rep1d+irTTjukNnCrOH0gxZ3gvglY1OjnzGmA4dwTfTH8yo77RoAI/c2u
> nT3lJeIEJbbuhGuZcgrR9m5P8E6GswdeAj2AWzohbG/yL8r+WCqaPzxvo6olgOU=
> =ddse
> -----END PGP SIGNATURE-----
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev




More information about the nix-dev mailing list