From fbe107fd5c7ca142f84d2552ef14364f0de2aa7b Mon Sep 17 00:00:00 2001 From: Javier Olaechea Date: Thu, 14 Sep 2023 09:46:07 -0500 Subject: [PATCH] ruby: document extraConfigPaths option from bundlerEnv --- doc/languages-frameworks/ruby.section.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index f1953500fa32..3df43a0f5f23 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -120,6 +120,16 @@ One common issue that you might have is that you have Ruby 2.6, but also `bundle mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; } ``` +Sometimes a Gemfile references other files. Such as `.ruby-version` or vendored gems. When copying the Gemfile to the nix store we need to copy those files alongside. This can be done using `extraConfigPaths`. For example: + +```nix + gems = bundlerEnv { + name = "gems-for-some-project"; + gemdir = ./.; + extraConfigPaths = [ "${./.}/.ruby-version" ]; + }; +``` + ### Gem-specific configurations and workarounds {#gem-specific-configurations-and-workarounds} In some cases, especially if the gem has native extensions, you might need to modify the way the gem is built.