Gem Install Ruby-odbc Error Sql.h Not Found
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Sql.h Not Found Ubuntu
this site About Us Learn more about Stack Overflow the company Business Learn ruby odbc example more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question sql.h not found mac x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Fatal Error: 'sql.h' File Not Found
gem install ruby-odbc -v '0.99995' Not able install on ubuntu 11.10 up vote 0 down vote favorite I am not getting error while installing gem ruby-odbc -v'0.99995'. Please help me to solve this error. I try lot of things but it didn't worked. Building native extensions. This could take a while... ERROR: Error installing ruby-odbc: ERROR: Failed to build gem native extension. /home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
Configure Error Sql.h Not Found Freetds
extconf.rb checking for version.h... yes 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 --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=/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby --with-odbc-dir --without-odbc-dir --with-odbc-include --without-odbc-include=${odbc-dir}/include --with-odbc-lib --without-odbc-lib=${odbc-dir}/lib ERROR: sql.h not found I am using ruby 1.8.7 & rails2 ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 rubygems share|improve this question asked Jun 24 '13 at 7:18 sheetal 295 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote Have you tried installing the unix odbc development files? sudo apt-get install unixodbc-dev share|improve this answer answered Jun 24 '13 at 8:18 Ju Liu 3,352616 Cheers! I had this issue too, the above worked perfectly. –Bealer Oct 18 '13 at 9:11 Thank you! Its worked for me... –Anuja Feb 19 '15 at 7:38 add a comment| up vote 2 down vote If you're on OS X and having this issue try brew install unixodbc Then you should be able to gem install ruby-
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow error installing ruby odbc error failed to build gem native extension the company Business Learn more about hiring developers or posting ads with us Stack
Unixodbc-dev
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of odbc rails 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “ERROR: sql.h not found” when installing ruby-odbc gem on Ubuntu up vote 13 down vote favorite 2 http://stackoverflow.com/questions/17269947/gem-install-ruby-odbc-v-0-99995-not-able-install-on-ubuntu-11-10 Attempting to install ruby-odbc gem on Debian/Ubuntu results in the following error; "ERROR: sql.h not found" ruby gem share|improve this question edited Feb 21 '15 at 13:51 asked Jun 12 '13 at 14:51 tombeynon 774517 add a comment| 2 Answers 2 active oldest votes up vote 22 down vote This happens on OSX too so brew to the rescue: brew install unixodbc share|improve this answer answered Mar 13 '14 at 14:44 eirc http://stackoverflow.com/questions/17068590/error-sql-h-not-found-when-installing-ruby-odbc-gem-on-ubuntu/17068591 1,157911 1 To get this to work, I had to run gem install ruby-odbc -- --with-odbc-dir=/usr/local/Cellar/unixodbc/2.3.2_1 (or whatever your path to ODBC dir as installed by Brew) –dmichael Nov 5 '14 at 14:58 I also had to use the approach listed in the comment above by @dmichael to get it working. I'm on Yosemite. –Terry Ray Jul 14 '15 at 0:40 same, here's the gem install command without weird formatting: gem install ruby-odbc -- --with-odbc-dir=/usr/local/Cellar/unixodbc/2.3.4 –manroe Aug 25 at 21:32 add a comment| up vote 18 down vote accepted Install the unixodbc-dev package, then try the gem install again sudo apt-get install unixodbc-dev gem install ruby-odbc share|improve this answer answered Jun 12 '13 at 14:51 tombeynon 774517 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ruby gem or ask your own question. asked 3 years ago viewed 4488 times active 1 year ago Related 9cannot install ruby gems - zlib e
(Guest) on 2010-12-20 03:43 Hello, I need to install my application to a https://www.ruby-forum.com/topic/695630 Windows server (using MSSQL as the DB) and to http://d.hatena.ne.jp/watanabe162/20111023/1319361324 make my life easier I am freezing the application. I have been able to freeze rails and unpack all the gems I need (including activerecord-sqlserver-adapter) except for one: ruby-odbc I can install the gem the regular way, which DevKit builds not found correctly. I can run the application with the gem "in the open". Then when I unpack the gem everything seems to work, I get the message "Unpacked gem: C:/Pepe/Code/RoR/afm/vendor/gems/ruby-odbc-0.99992", but after I uninstall the 'regular' gem and try to start Mongrel: C:\Pepe\Code\RoR\afm>ruby script/server => Booting Mongrel => Rails 2.3.5 application sql.h not found starting on http://0.0.0.0:3000 C:/Pepe/Code/RoR/afm/config/../vendor/rails/railties/lib/rails/ gem_dependency.rb :119:Warning: Gem::Dependency#version_requirements is deprecated and will be rem oved on or after August 2010. Use #requirement The following gems have native components that need to be built ruby-odbc = 0.99992 You're running: ruby 1.8.7.302 at C:/Ruby187/bin/ruby.exe rubygems 1.3.7 at C:/Users/bob/.gem/ruby/1.8, C:/Ruby187/lib/ruby/ gems/1.8 Run `rake gems:build` to build the unbuilt gems. I then try to build: C:\Pepe\Code\RoR\afm>rake gems:build (in C:/Pepe/Code/RoR/afm) rake aborted! ERROR: Failed to build gem native extension. C:/Ruby187/bin/ruby.exe extconf.rb 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 --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:/Ruby187/bin/ruby --with-odbc-dir --without-odbc-dir --with-odbc-include --without-odbc-include=${odbc-dir}/include --with-odbc-lib --without-odbc-lib=${odbc-dir}/lib ERROR: sql.h not found Gem files will remain installed in C:/Pepe/Code/RoR/afm/vendor/gems/ ruby-odbc-0.
ODBC moduleからruby-odbcのソースをダウンロードし、解凍する。$ tar xvzf ruby-odbc-0.99994.tar.gz -C ../$ cd ~/ruby-odbc-0.99994バージョンが上がってて、インストール方法が異なるようだ。。。で、READMEとかいろいろ見ていると、解凍したディレクトリの中にgem.specというのがあるではないか!もしやと思い、gem searchしてみる# gem search ruby-odbc -r REMOTE GEMS *** kemen-ruby-odbc (0.1)ruby-odbc (0.99994)なんとgemであるので、gemでインストールすることにする。# gem install ruby-odbcERROR: Error installing ruby-odbc: ERROR: Failed to build gem native extension./usr/local/bin/ruby extconf.rbchecking for version.h... nochecking for sql.h... no extconf.rb failed *** Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers. Check the mkmf.log file for moredetails. 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=/usr/local/bin/ruby --with-odbc-dir --without-odbc-dir --with-odbc-include --without-odbc-include=${odbc-dir}/include --with-odbc-lib --without-odbc-lib=${odbc-dir}/libERROR: sql.h not foundGem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/ruby-odbc-0.99994 for inspection.Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/ruby-odbc-0.99994/ext/gem_make.outエラーになった。sql.hがないらしい。sql.hはunixODBC-develにあるらしいので、# yum search unixODBC-devel(略)unixODBC-devel.i686 : Development files for programs which will use the unixODBC : libraryunixODBC-devel.x86_64 : Development files for