Closed quynhethereal closed 1 year ago
Could you post the output of the following commands under Rosetta?
ruby -v
ruby -e "puts [nil].pack('P').size"
ruby -r etc -e "puts Etc.uname[:machine]"
uname -m
file `rbenv which ruby`
I guess that
oraconf.rb
guesses that it isn't x86_64 by mistake. So it rejects Oracle instant client for x86_64.Thanks @kubo. You are absolutely correct. I was using the arm-64 version of Ruby 2.7.4. After I switched to x86 version it is able to install the gem. Thank you very much for your support!
Thank you very much. I've been trying to install this gem on a M2 MBP for a while now.
Thanks @kubo. You are absolutely correct. I was using the arm-64 version of Ruby 2.7.4. After I switched to x86 version it is able to install the gem. Thank you very much for your support!
@quynhethereal How did you make the change?
@elgartoinf In my case, I used Rosetta Terminal for the installation. You can double check that you are running the correct architecture by running arch
command. It should output i386
.
You can then use Homebrew to install rvm
(a Ruby Version Manager or whatever VM you like) and install Ruby. Your Ruby version installed will be the x86 version. Double check by running ruby --version
and see that it is the x86
one (rather than the arm64).
Hi there,
First of all, thank you for your work. I'm currently having some issues with the gem installation that I hope you can provide some insights into.
I'm using a Mac M1 Pro 2021. I run my terminal under Rosetta (so the architecture is i386) as I know that there is no native version of Oracle's instant client yet. I'm using the official brew installation guide from Oracle to install the client, i.e:
Below are my environment configurations:
The instant client is installed at path:
/usr/local/Homebrew/Cellar
.The OCI_DIR has these files:
However, when I try to run the command
gem install ruby-oci8 -v '2.2.11'
I'm met withOracle instant client is not found. (RuntimeError)
. Complete log is attached below:I have traced into the source code of the error (https://github.com/kubo/ruby-oci8/blob/19c4341616550debfcf66e40ea6daf0831b24e7a/ext/oci8/oraconf.rb#L497-L510) and found that this error occurs when the program fails to find the files with glob
#{oci_basename}.#{so_ext}#{oci_glob_postfix}
(https://github.com/kubo/ruby-oci8/blob/19c4341616550debfcf66e40ea6daf0831b24e7a/ext/oci8/oraconf.rb#L451). It is quite weird to me as the files in the OCI_DIR matches the same pattern as the glob condition.Can you share some insights on how to debug this issue? Thank you so much in advance.