Attached a patch for adding Ruby 2.1.6. It works for me. This is to try developing and supporting gems that do not necessarily work with (latest) Ruby 2.2.2. It is also useful for the Rails people.
We ought to add Ruby 1.9 too, as well as (eventually) Rubinius (LLVM) and JRuby (JVM). It may appear silly to have different Ruby versions, but it is a fact that not all gems play well on all versions and one of the strengths of GNU Guix is that you can actually have multiple versions (similar to what Python needs). If I want to create a gem that only works on one specific version of Ruby, it should not matter to the end-user. Pj.
>From be945cf4d65ab77eb8bd7a462aa0b7d24877ba74 Mon Sep 17 00:00:00 2001 From: pjotrp <pjotr.publi...@thebird.nl> Date: Sat, 13 Jun 2015 13:22:10 +0200 Subject: [PATCH] gnu: Add ruby 2.1.6 * gnu/packages/ruby.scm (ruby-2.1): New variable. --- gnu/packages/ruby.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 9943de7..f0c645e 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -87,6 +87,34 @@ a focus on simplicity and productivity.") (home-page "https://ruby-lang.org") (license license:ruby))) +(define-public ruby-2.1 + (package (inherit ruby) + (version "2.1.6") + (source + (origin + (method url-fetch) + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" + (version-major+minor version) + "/ruby-" version ".tar.bz2")) + (sha256 + (base32 + "1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv")))) + (native-search-paths '()) + (arguments + `(#:test-target "test" + #:parallel-tests? #f + #:phases + (alist-cons-before + 'configure 'replace-bin-sh + (lambda _ + (substitute* '("Makefile.in" + "ext/pty/pty.c" + "io.c" + "lib/mkmf.rb" + "process.c") + (("/bin/sh") (which "sh")))) + %standard-phases))))) + (define-public ruby-1.8 (package (inherit ruby) (version "1.8.7-p374") -- 1.7.10.4