about summary refs log tree commit diff
path: root/doc/languages-frameworks/ruby.section.md
diff options
context:
space:
mode:
authorJavier Olaechea <pirata@gmail.com>2023-09-14 09:46:07 -0500
committerJavier Olaechea <pirata@gmail.com>2023-09-14 09:46:07 -0500
commitfbe107fd5c7ca142f84d2552ef14364f0de2aa7b (patch)
tree1420e6d58f41dc7c2eaf59582593aae5d7fa1e24 /doc/languages-frameworks/ruby.section.md
parent961a90f4e5f7b1c6ff5cb32499f6e4972d732f78 (diff)
downloadnixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar.gz
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar.bz2
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar.lz
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar.xz
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.tar.zst
nixlib-fbe107fd5c7ca142f84d2552ef14364f0de2aa7b.zip
ruby: document extraConfigPaths option from bundlerEnv
Diffstat (limited to 'doc/languages-frameworks/ruby.section.md')
-rw-r--r--doc/languages-frameworks/ruby.section.md10
1 files changed, 10 insertions, 0 deletions
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.