-
Conditional gems in ruby without breaking Gemfile.lock
Do you want ruby/bundler to skip a gem install on a certain platform, but any other platform needs that gem? The obvious answer would be the following, which would result in also clobbering your Gemfile.lock if bundling on macOS: gem “openssl”, “= 3.2.0” if RUBY_PLATFORM !~ /darwin/ But bundler has its own method, install_if , to accomplish such a…
-
Quick script to dump info about OpenSSL in ruby
Ruby can be built with OpenSSL by default or built with an alternate OpenSSL library (for example, if you had Ruby 3.0 and wanted an OpenSSL >= 3.0.0). There are a few constants and methods to check the version and capabilities of you OpenSSL library connected to Ruby, all from the module OpenSSL documentation available…