[Nix-dev] Ruby Development on Nix
Taeer Bar-Yam
tb442 at cornell.edu
Fri Jul 15 22:16:48 CEST 2016
Oh. Huh. That's very good to know, thank you. So is that the preferred nix model for programming language packages then?
--Taeer
> On Jul 15, 2016, at 4:05 PM, Freddy Rietdijk <freddyrietdijk at fridh.nl> wrote:
>
> Hi Taeer,
>
> For instance, the python model of
> python27Packages.package1
> python27Packages.package2
> is very different from the haskell model of
> (haskellPackages.ghcWithPackages (h: with h; [
> package1
> package2
> ])
>
> Actually, they're quite similar. For Python we also have `python.buildEnv` and `python.withPackages` of which the use is identical to your Haskell example. In certain cases it is possible to install or use individual Python packages but using `python.buildEnv` or `python.withPackages` generally works better.
>
>
>
> On Fri, Jul 15, 2016 at 9:41 PM, Taeer Bar-Yam <tb442 at cornell.edu <mailto:tb442 at cornell.edu>> wrote:
> Dear Knowledgable Nixers,
>
> Introduction
> I have been trying to get ruby gems installed in any way on my nixos machine. I have been reading up on the wikis, and I understand that this is not yet well put together. However, it seems that even things that aught to be working are not.
>
> Problem
> I put "bundler" in my configuration.nix, and it installs fine. However, when I try to actually run it, I get the error message:
> /nix/store/n5gqlhs1nmadxkbibv42wnxq3m7f404k-ruby-2.3.0-p0/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
> from /run/current-system/sw/bin/bundler:14:in `<main>'
>
> I tried to add the gem I wanted to my configuration.nix directly using buildRubyGem, but ruby was not able to find it.
>
> The method the manual prescribes is dependent on already having bundler installed, so I have not had a chance to test that.
>
> Request/Solution
> I am interested in contributing to the nix community by developing a better system for ruby gem installation, so I guess what I am looking for is the following:
>
> 1) For now, what is the current simplest way to install a ruby gem so that I can, in the terminal, type
> $ irb
> > require 'desired_gem'
> and it will work?
> This can include simply installing bundler and using that locally with a gemfile, but I would prefer that any system-wide installation be done through configuration.nix
>
> 2) If I'm going to add a system for installing ruby gems, what would be the right way to design it? I understand that programming languages sometimes have structure that prevents us from always using the ideal path, so can y'all point me to a programming language that is considered "done right"?
>
> For instance, the python model of
> python27Packages.package1
> python27Packages.package2
>
> is very different from the haskell model of
> (haskellPackages.ghcWithPackages (h: with h; [
> package1
> package2
> ])
> My understanding is that the haskell model is a less-than-ideal kludge because haskell wont allow the python method. Is that right? Is there an even better way than python?
>
> Lastly, is there anyone already working on this that I should get in touch with instead of splitting efforts?
>
> Thank you,
> --Taeer
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl <mailto:nix-dev at lists.science.uu.nl>
> http://lists.science.uu.nl/mailman/listinfo/nix-dev <http://lists.science.uu.nl/mailman/listinfo/nix-dev>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160715/4501c13e/attachment.html>
More information about the nix-dev
mailing list