Repository navigation
Replies: 1 comment
|
pixi doesn't have a post-install hook yet, but you can get both things with a Gemfile and a cached task. Bundler manages the gems (with a lock file), pixi manages Ruby, and the gems stay inside the project: [dependencies]
ruby = "*"
[activation.env]
BUNDLE_PATH = "$PIXI_PROJECT_ROOT/.gems"
BUNDLE_GEMFILE = "$PIXI_PROJECT_ROOT/Gemfile"
[tasks.gems]
cmd = "bundle install"
inputs = ["Gemfile", "Gemfile.lock"]
outputs = [".gems/**/*", "Gemfile.lock"]
[tasks.check]
cmd = "bundle exec ruby -e 'require \"scorm\"; puts :ok'"
depends-on = ["gems"]# Gemfile
source "https://rubygems.org"
gem "scorm"
gem "rexml"
I tested this with pixi 0.81 and ruby 4.0.6 from conda-forge. Nothing ends up in Does that cover what you need, or were you hoping for gems in |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
is there a good way to manage ruby gems in a pixi project? I see some discussions (e.g. #2281, #2343, #3225) about globally installing
ruby, but I would like to isolate this within a project. The following seems to work:How can I do something like this with the following features:
pixi run gem install scormor similar when building the environment so that users get everything? (Some sort of post install hook?) There is some discussion here Lifecycle hooks #1897, but it does not seem relevant yet.pixi?All reactions