Closed chornbec closed 4 days ago
I can see that prometheus-client-mmap
has platform-specific gem versions (e.g. 1.1.1-x86_64-linux) that should be pre-built and hence shouldn't require Rust for installation.
Check that you don't have force_ruby_platform
Bundler config set (e.g. BUNDLE_FORCE_RUBY_PLATFORM="true"
) as it forces native extensions to be compiled (see https://www.bundler.cn/man/bundle-config.1.html)
And yes, you can pin version of a dependency yourself right in your Gemfile, just place gem "prometheus-client-mmap", "~> 0.28.1"
anywhere)
Thank you, that's helpful as I'm not an expert with bundler. I noticed force_ruby_platform
was enabled globally within my Dockerfile. After removing that and specifying the below in my Gemfile, installation worked.
gem 'prometheus-client-mmap', '~> 1.1.1'
gem 'yabeda-prometheus-mmap'
About a year ago,
prometheus-client-mmap
replaced the C extension with Rust, so now Rust is required to installprometheus-client-mmap
and hence thisyabeda-prometheus-mmap
gem seeing asprometheus-client-mmap
is a dependency.I'm using Docker, and if we follow the current setup for this gem, it will not work unless you're using an image that already includes Rust and
libclang-dev
. Is there a note or additional steps we can add for installing with Docker? Or possibly even better, can we pin the version ofprometheus-client-mmap
to the version before it requires Rust (version0.28.1
)?