Trying to compile a ruby module to use a specific version of Ruby. RVM is installed and the default with ruby version 2.6.6
# rvm ruby version which is the default in my environment
ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]
# mac os installed ruby version
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
When I compile ruby module for unit
./configure ruby --module=ruby2.6.6 --ruby=/Users/hades/.rvm/rubies/ruby-2.6.6/bin/ruby
configuring Ruby module
checking for Ruby library ... found
checking for Ruby version ... 2.6.3 <-------------------
+ Ruby module: ruby2.6.6.unit.so
The log message from unit is indicating that it is finding the older mac os ruby version even when I am providing the specific ruby version to compile against (which is higher than the default mac os version). Confirmed this by using the compiled module. It runs against the os version and NOT the version passed to configure.
Is this a known issue or is there an additional flag that needs to be passed to configure?
thanks!
Hello,
The issue is caused by same so-name for system and RVM ruby version - both are ruby.2.6.0. Unfortunately, there is no configure option to bypass system library check. For now you can patch auto/modules/ruby script and remove system library check (lines 76 - 90).
Thanks for reporting the issue! We need to add an option to configure to skip the system library check or explicitly specify library path.
Please try this patch: ruby.patch.txt
That worked. Thanks!