cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.56k stars 259 forks source link

examples/rubyonrails: make test pass #1089

Closed bobvanderlinden closed 1 month ago

bobvanderlinden commented 1 month ago

The tests now seem to run inside a pure environment and tests were failing with strange errors.

Initially I worked through the gem install rails failures by installing the failing gems individually. This worked, but lead me to a failure from railties which required git to be available. After adding git, it seemed that installing the individual gems wasn't needed anymore, so I removed those statements. Let's :crossed_fingers: something in my environment hasn't made the test succeed by accident.

Lastly, the test itself uses curl to fetch the version from rails, so this package is also added.

I tested this using:

git clean -xdf examples/ && nix build && PATH=$PWD/result/bin:$PATH ./result/bin/devenv-run-tests 
--only rubyonrails examples

Just a side-note: I'm still somewhat unsure about the process-manager that runs inside the test. It exists after devenv-run-tests exits. Left-over processes might potentially influence other things.