Rails Github Action exits with code 16
I have a Rails application that runs on Ruby alpine image. When I was running github actions workflow, it threw an error when installing gems.
The workflow file is basically the copy of the official Ruby on Rails CI template, which you can easily find from Github Actions tab on any repo.
When it hits the point where installing gems using
bundle install, it stops with
Error: The process '/opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle' failed with exit code 16
Simply, I had to run
bundle lock --add-platform x86_64-linux
on my local machine. Ofc, like me, if you are developing the app on a docker container, add docker stuff before the command. The reason being is that the workflow is running on Ubuntu, instead of Alpine like my local container.
github github actions rails docker