diff --git a/doc/guix.texi b/doc/guix.texi
index 0d24b12f8cb334de1a4d57601f7519d635137d24..71b3b2d52907102780d9e473b85a7b236ccc1a90 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2458,7 +2458,8 @@ implements the RubyGems build procedure used by Ruby packages, which
 involves running @code{gem build} followed by @code{gem install}.
 
 Which Ruby package is used can be specified with the @code{#:ruby}
-parameter.
+parameter.  A list of additional flags to be passed to the @command{gem}
+command can be specified with the @code{#:gem-flags} parameter.
 @end defvr
 
 @defvr {Scheme Variable} waf-build-system
diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index e4fda30cf394321ebd24489ff7a8913ba058e10c..135eda665b7414d67d403aaaeab2d9cf5381a070 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -71,6 +71,7 @@ (define private-keywords
 
 (define* (ruby-build store name inputs
                      #:key
+                     (gem-flags ''())
                      (test-target "test")
                      (tests? #t)
                      (phases '(@ (guix build ruby-build-system)
@@ -95,6 +96,7 @@ (define builder
                                (source
                                 source))
                    #:system ,system
+                   #:gem-flags ,gem-flags
                    #:test-target ,test-target
                    #:tests? ,tests?
                    #:phases ,phases
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index fce39b8dfd82cd90c52d74e93e3a1a3b18ff1951..307ac919dd6a1940cde2e84f4fd1bae39d8c4317 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -63,7 +63,8 @@ (define* (check #:key tests? test-target #:allow-other-keys)
       (zero? (system* "rake" test-target))
       #t))
 
-(define* (install #:key source inputs outputs #:allow-other-keys)
+(define* (install #:key source inputs outputs (gem-flags '())
+                  #:allow-other-keys)
   (let* ((ruby-version
           (match:substring (string-match "ruby-(.*)\\.[0-9]$"
                                          (assoc-ref inputs "ruby"))
@@ -72,10 +73,11 @@ (define* (install #:key source inputs outputs #:allow-other-keys)
          (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0")))
     (setenv "GEM_HOME" gem-home)
     (mkdir-p gem-home)
-    (zero? (system* "gem" "install" "--local"
-                    (first-matching-file "\\.gem$")
-                    ;; Executables should go into /bin, not /lib/ruby/gems.
-                    "--bindir" (string-append out "/bin")))))
+    (zero? (apply system* "gem" "install" "--local"
+                  (first-matching-file "\\.gem$")
+                  ;; Executables should go into /bin, not /lib/ruby/gems.
+                  "--bindir" (string-append out "/bin")
+                  gem-flags))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases