RVM gemset breaks Nix or Docker

Ruby on Rails 7 app. I have a /.ruby-version file that RVM uses to set defaults When no gemset is indicated, Railway builds the app just fine. But if I indicate one, deploy fails.
╔═════════════════════════ Nixpacks v0.11.5 ══════════════════╗
║ setup │ pkgs: procps, libpq-dev ║
║ │ cmds: curl -sSL https://get.rvm.io | bash -s stable && .║
║ │ /etc/profile.d/rvm.sh ║
║ │ rvm install ruby-3.1.2@liters_tracker ║
║ │ rvm --default use ruby-3.1.2@liters_tracker ║
║ │ gem install bundler:2.3.6 ║
║ │ echo 'source /usr/local/rvm/scripts/rvm' >> /root/.profile
...
#11 [stage-0 7/19] RUN rvm install ruby-3.1.2@liters_tracker
...

#11 0.719 Warning! PATH is not properly set up, /usr/local/rvm/gems/ruby-3.1.2@liters_tracker/bin is not available.
...
#11 116.0 ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2@global

#11 116.1 ruby-3.1.2 - #importing gemset /usr/local/rvm/gemsets/global.gems
..........................................................

#11 118.8 ruby-3.1.2 - #generating global wrappers
........
#11 119.4 ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2

#11 119.5 ruby-3.1.2 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
#11 119.5 ruby-3.1.2 - #generating default wrappers
...
#11 120.8 Gemset 'liters_tracker' does not exist, 'rvm ruby-3.1.2 do rvm gemset create liters_tracker' first, or append '--create'.

#11 ERROR: executor failed running [/bin/bash -ol pipefail -c rvm install ruby-3.1.2@liters_tracker]: exit code: 2
-----
> [stage-0 7/19] RUN rvm install ruby-3.1.2@liters_tracker:
-----
executor failed running [/bin/bash -ol pipefail -c rvm install ruby-3.1.2@liters_tracker]: exit code: 2

Error: Docker build failed
╔═════════════════════════ Nixpacks v0.11.5 ══════════════════╗
║ setup │ pkgs: procps, libpq-dev ║
║ │ cmds: curl -sSL https://get.rvm.io | bash -s stable && .║
║ │ /etc/profile.d/rvm.sh ║
║ │ rvm install ruby-3.1.2@liters_tracker ║
║ │ rvm --default use ruby-3.1.2@liters_tracker ║
║ │ gem install bundler:2.3.6 ║
║ │ echo 'source /usr/local/rvm/scripts/rvm' >> /root/.profile
...
#11 [stage-0 7/19] RUN rvm install ruby-3.1.2@liters_tracker
...

#11 0.719 Warning! PATH is not properly set up, /usr/local/rvm/gems/ruby-3.1.2@liters_tracker/bin is not available.
...
#11 116.0 ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2@global

#11 116.1 ruby-3.1.2 - #importing gemset /usr/local/rvm/gemsets/global.gems
..........................................................

#11 118.8 ruby-3.1.2 - #generating global wrappers
........
#11 119.4 ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2

#11 119.5 ruby-3.1.2 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
#11 119.5 ruby-3.1.2 - #generating default wrappers
...
#11 120.8 Gemset 'liters_tracker' does not exist, 'rvm ruby-3.1.2 do rvm gemset create liters_tracker' first, or append '--create'.

#11 ERROR: executor failed running [/bin/bash -ol pipefail -c rvm install ruby-3.1.2@liters_tracker]: exit code: 2
-----
> [stage-0 7/19] RUN rvm install ruby-3.1.2@liters_tracker:
-----
executor failed running [/bin/bash -ol pipefail -c rvm install ruby-3.1.2@liters_tracker]: exit code: 2

Error: Docker build failed
step #11 116.0 shows a global gemset getting created. Is there a way to override this?
5 Replies
chiperific
chiperific2y ago
Any suggestions?
angelo
angelo2y ago
Hey @chiperific - Project ID please?
chiperific
chiperific2y ago
e0cf682e-3491-4309-b018-e3f50c9eba10 Any update @Angelo
angelo
angelo2y ago
Hey @chiperific - big sorry on the delay. I notice the build is successful, however, I think you are still waiting on the Gemset fix yes? Whoop! Seems to be all good now! Going to mark as resolved
chiperific
chiperific2y ago
@Angelo, apologies for missing this. I successfully deploy by removing the gemset from .ruby-version E.g.: when .ruby-version is ruby-3.1.2 it deploys fine. When it's ruby-3.1.2@mygemset it fails towards the end of the build. @Angelo, can you confirm this was patched?