packaged gem executable in ruby apk doesn't set "x86_64-linux" platform
Using the alpine linux container
“gem env platform” returns “ruby”
I was expecting to see “ruby:x86_64-linux”
This impacts the install of some gems for example gem install linux-kstat won’t work as expect if the platform isn’t set as expect. You’ll get an older version of the gem (linux-kstat-0.1.0) instead of the expected (linux-kstat-0.2.0-universal-linux.gem).
If I use gem install with the —platform option the correct version gets installed. But this presents a problem later as part of normal ruby operation because the default platform setting is such that the linux specific gem isn’t found unless you do some pretty invasive changes in the ruby environment to get the non-default platform to be used.
Installing ruby 2.5.1 via ruby-install project into the container gem platform is set as expected.
No idea why ruby-install is getting the platform correct, but the apk packaged ruby is failing. Is the build environment for the package missing something?
(from redmine: issue id 9440, created on 2018-09-21, closed on 2018-10-07)