From 0c40166b6eecd6f7e22e4fe7bc7eee2be94f1b43 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Mon, 30 Mar 2020 01:59:27 +1030 Subject: [PATCH] Load arch-specific gems on MRI --- lib/gel/environment.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/gel/environment.rb b/lib/gel/environment.rb index c1574468..54e85111 100644 --- a/lib/gel/environment.rb +++ b/lib/gel/environment.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "rbconfig" +require_relative "support/gem_platform" class Gel::Environment IGNORE_LIST = %w(bundler gel rubygems-update) @@ -12,7 +13,14 @@ class << self end self.gemfile = nil @active_lockfile = false - @architectures = [defined?(org.jruby.Ruby) ? "java" : nil, "ruby"].compact.freeze + @architectures = [ + if defined?(org.jruby.Ruby) + "java" + else + Gel::Support::GemPlatform.new(RbConfig::CONFIG["arch"]) + end, + "ruby", + ].compact.freeze GEMFILE_PLATFORMS = begin v = RbConfig::CONFIG["ruby_version"].split(".")[0..1].inject(:+)