Closed TheCaucasianAsian closed 8 years ago
Could you post the output of the following command?
C:\RailsInstaller\Ruby2.1.0\bin\ruby --version
Thank you for the quick response! Here's the output: C:\Sites>C:\RailsInstaller\Ruby2.1.0\bin\ruby --version ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
(1) The target platform of Oracle client must be same with that of the ruby.
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
The ruby was compiled for Windows 32-bit because it includes i386-mingw32
.
checking C:\instantclient_12_1... skip: C:/instantclient_12_1/oci.dll is for x86_64 cpu.
The Oracle client was compiled for Windows x64. You need to install Oracle client for Windows 32-bit instead.
(2) Unknown platform i386-mingw32
.
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
The target platform is i386-mingw32
.
However ruby-oci8 gems provide binary gems for x86-mingw32
and x64-mingw32
.
See: https://rubygems.org/gems/ruby-oci8/
i386-mingw32
is same with x86-mingw32
but the names are different.
Thus gem install ruby-oci8
could not find a binary gem and tried to install a gem which required compilation.
You need to forcedly install a gem for x86-mingw32
as follows.
gem install ruby-oci8 --platform=x86-mingw32
You may need to uninstall ruby-oci8
in advace.
gem uninstall ruby-oci8
gem install ruby-oci8 --platform=x86-mingw32
Hi Kubo,
Thanks again, your first bullet point addressed the issue. I had the 64 bit installed. These are the steps I undertook to get everything working:
Thank you for your help and I hope this helps someone too!
Hi,
Thank you in advance for any/all assistance. I've been trying to install ruby-oci8 for 3 days now in Windows 8.
I've installed both the Oracle Full Client 12C(Software only) and Oracle Instant Client. My Environment Variables seem fine (SQL Plus is working.) No matter what I do I can't get this to work, here's the most recent gem install output:
C:\Sites>gem install ruby-oci8 Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing ruby-oci8: ERROR: Failed to build gem native extension.
DL is deprecated, please use Fiddle checking for load library path... PATH... checking C:\RailsInstaller\DevKit\bin... no checking C:\RailsInstaller\DevKit\mingw\bin... no checking C:\RailsInstaller\Ruby2.1.0\bin... no checking C:\RailsInstaller\Ruby2.1.0\lib\ruby\gems\1.9.1\bin... no checking C:\RailsInstaller\DevKit\bin... no checking C:\instantclient_12_1... skip: C:/instantclient_12_1/oci.dll is f or x86_64 cpu. checking C:\RailsInstaller\Ruby2.1.0\bin... no checking C:\Users\gl134d\AppData\Local\Programs\Python\Python35-32\Scripts. .. no checking C:\Users\gl134d\AppData\Local\Programs\Python\Python35-32... no checking C:\Ruby22-x64\bin... no checking C:\Program Files (x86)\Nmap... no checking C:\OpenSSL-Win32\bin... no checking .... no checking .... no checking for cc... ok checking for gcc... yes checking for LP64... no checking for sys/types.h... yes checking for ruby header... ok Get the version of Oracle from SQLPlus... ** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/RailsInstaller/Ruby2.1.0/bin/ruby --with-instant-client --without-instant-client C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2.1/ext/oci8/or aconf.rb:823:in
get_version': RuntimeError (RuntimeError) from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2. 1/ext/oci8/oraconf.rb:772:in
initialize' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2. 1/ext/oci8/oraconf.rb:320:innew' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2. 1/ext/oci8/oraconf.rb:320:in
get'from extconf.rb:22:in `'
Error Message: cannot get Oracle version from sqlplus Backtrace: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2.1/ext/oci8/ oraconf.rb:823:in
get_version' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2.1/ext/oci8/ oraconf.rb:772:in
initialize' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2.1/ext/oci8/ oraconf.rb:320:innew' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.2.1/ext/oci8/ oraconf.rb:320:in
get'extconf.rb:22:in `'
See:
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1 .0/gems/ruby-oci8-2.2.1 for inspection. Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86 -mingw32/2.1.0/ruby-oci8-2.2.1/gem_make.out
Thanks again for any assistance. -Bryan