Unverified Commit 3b1f3712 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #255128 from PuercoPop/ruby-document-extraConfigPaths

ruby: document extraConfigPaths option from bundlerEnv
parents 833a6ec7 fbe107fd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -121,6 +121,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.