Skip to content

How could one use a specific version of rubygems with devenv? #158

@hasrthur

Description

@hasrthur

Hi!
Thank you for the great package.
I need to use a specific version of rubygems. Though I have no idea how to do that. I use devenv and this is the point where I am stuck:

  languages.ruby = {
    enable = true;
    versionFile = ./.ruby-version;
    bundler = {
      enable = true;
      package = pkgs.bundler.override {
        ruby = config.languages.ruby.package.override {
          rubygems = "3.6.1";
        };
      };
    };
  };

and it gives me

• Using Cachix: devenv
building '/nix/store/jlxqv876szrwbisqy7nqpps3gjj8vpn0-ruby-3.3.4.drv'
Running phase: unpackPhase
unpacking source archive /nix/store/p1ic9a8il83gchhhkicn36flx501mm96-ruby-3.3.4.tar.gz
source root is ruby-3.3.4
setting SOURCE_DATE_EPOCH to timestamp 1720481304 of file ruby-3.3.4/yjit.rbinc
Running phase: patchPhase
cp: cannot stat '3.6.1': No such file or directory
error: builder for '/nix/store/jlxqv876szrwbisqy7nqpps3gjj8vpn0-ruby-3.3.4.drv' failed with exit code 1;
       last 6 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/p1ic9a8il83gchhhkicn36flx501mm96-ruby-3.3.4.tar.gz
       > source root is ruby-3.3.4
       > setting SOURCE_DATE_EPOCH to timestamp 1720481304 of file ruby-3.3.4/yjit.rbinc
       > Running phase: patchPhase
       > cp: cannot stat '3.6.1': No such file or directory
       For full logs, run 'nix log /nix/store/jlxqv876szrwbisqy7nqpps3gjj8vpn0-ruby-3.3.4.drv'.
error: 1 dependencies of derivation '/nix/store/b8s96ma4x3jrcf78c31bxqbfrybxjrm9-bundler-2.5.22.drv' failed to build
error: 1 dependencies of derivation '/nix/store/w0ykm154fs8vrrg93hdy7knkxj88dk2q-devenv-profile.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vc24gxwiwkljajpiy4r65xx0yk7s770z-process-compose.yaml.drv' failed to build
error:
       error: 3 dependencies of derivation '/nix/store/z9y08ifhzs0q53bqa80alkywb8ij3q9m-devenv-shell-env.drv' failed to build
Error:   × Failed to run command `/nix/store/90h46i0fwrnci2mvbnr47w44njbz0qb5-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes
  │ --option warn-dirty false --keep-going --max-jobs 16 --option eval-cache false --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-
  │ 1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= print-dev-env --profile /home/artur/Projects/InterviewsOnline/saas-ruby/.devenv/gc/shell -vv --log-format internal-json`
  ╰─▶ Nix command failed: exit status: 1

direnv: failed to build the devenv environment. devenv.nix may contain errors. see above.

I am not sure what file it wants to be honest. Any ideas on where to dig?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions