--- a/make-rules/prep-unpack.mk Thu Feb 18 08:19:13 2016 -0800
+++ b/make-rules/prep-unpack.mk Tue Feb 16 14:56:03 2016 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
#
UNPACK = $(WS_TOOLS)/userland-unpack
@@ -40,8 +40,11 @@
UNPACK_STAMP$(1) = $$(SOURCE_DIR$(1))/.unpacked
+# RUBY_VERSION is passed on to ensure userland-unpack uses the
+# correct gem command for the ruby version specified
$$(UNPACK_STAMP$(1)): $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) download
$$(RM) -r $$(SOURCE_DIR$(1))
+ $(ENV) RUBY_VERSION=$(RUBY_VERSION) \
$$(UNPACK) $$(UNPACK_ARGS$(1)) $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1))
$$(COMPONENT_POST_UNPACK_ACTION$(1))
$$(TOUCH) $$@