I'm trying to get the ruby-odbc gem installed on a Mac OS X 10.9 under ruby-1.9.3-p547 for use with a rails 2.3.12 application which connects to a SAP system over ODBC.
Environment
- Mac OS X 10.9 (Mavericks)
- RVM with ruby 1.9.3 and other rubies installed
- Gems for Rails 2.3.12 application
- Brew
- iODBC installed
Situation
The gem system fails the build when executing
gem install ruby-odbc
complaining about not being able to find sql.h
as in
ERROR: sql.h not found
I then attempted to tell the gem installation environment where the ODBC headers were located via
gem install ruby-odbc -- --with-odbc-dir=/usr/local/iODBC
But this fails still with the following messages (basically still can't find the sql.h header files).
At this point - stuck as unable to get the gem built
This could take a while...
ERROR: Error installing ruby-odbc:
ERROR: Failed to build gem native extension.
/Users/grantsayer/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb --with-odbc-dir=/usr/local/iODBC --with-odbc-include=/usr/local/iODBC/include
checking for version.h... no
checking for sql.h... no
*** 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
--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=/Users/grantsayer/.rvm/rubies/ruby-1.9.3-p547/bin/ruby
--with-odbc-dir
--with-odbc-include=${odbc-dir}/include
--with-odbc-lib
--without-odbc-lib=${odbc-dir}/lib
ERROR: sql.h not found
extconf failed, exit code 1