rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 189 forks source link

gem install on jruby-1.6.3 don't work #36

Closed plentz closed 13 years ago

plentz commented 13 years ago

if I try to run gem install tiny_tds with jruby-1.6.3, it show the following stacktrace.

~/foo (master) $ gem install tiny_tds
Building native extensions.  This could take a while...
ERROR:  Error installing tiny_tds:
    ERROR: Failed to build gem native extension.

        /Users/plentz/.rvm/rubies/jruby-1.6.3/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
looking for library directory /Users/plentz/.rvm/gems/jruby-1.6.3/lib ... no
looking for library directory /Users/plentz/.rvm/gems/jruby-1.6.3/lib/freetds ... no
looking for library directory /Users/plentz/.rvm/gems/jruby-1.6.3@global/lib ... no
looking for library directory /Users/plentz/.rvm/gems/jruby-1.6.3@global/lib/freetds ... no
looking for library directory /Users/plentz/.rvm/rubies/jruby-1.6.3/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /Users/plentz/.rvm/rubies/jruby-1.6.3/lib/freetds ... no
looking for library directory /Users/plentz/.rvm/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /Users/plentz/.rvm/lib/freetds ... no
looking for library directory /opt/local/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /opt/local/lib/freetds ... no
looking for library directory /usr/local/mysql/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /usr/local/mysql/lib/freetds ... no
looking for library directory /opt/local/lib/postgresql84/lib ... no
looking for library directory /opt/local/lib/postgresql84/lib/freetds ... no
looking for library directory /usr/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /usr/lib/freetds ... no
looking for library directory /usr/local/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /usr/local/lib/freetds ... no
looking for library directory /usr/X11/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /usr/X11/lib/freetds ... no
-----
Can not find FreeTDS's db-lib or include directory.
-----
*** 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=/Users/plentz/.rvm/rubies/jruby-1.6.3/bin/jruby
    --enable-iconv
    --disable-iconv
    --enable-iconv
    --disable-iconv
    --with-freetds-dir
    --without-freetds-dir
    --with-freetds-include
    --without-freetds-include=${freetds-dir}/include
    --with-freetds-lib
    --without-freetds-lib=${freetds-dir}/lib
    --enable-lookup
    --disable-lookup
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib
    --with-sybdblib
    --without-sybdblib

Gem files will remain installed in /Users/plentz/.rvm/gems/jruby-1.6.3/gems/tiny_tds-0.4.5 for inspection.
Results logged to /Users/plentz/.rvm/gems/jruby-1.6.3/gems/tiny_tds-0.4.5/ext/tiny_tds/gem_make.out
metaskills commented 13 years ago

Did you install FreeTDS?

plentz commented 13 years ago

Nope. btw, it will work on windows? I've looked at their side and they don't mention windows. I'm using jruby with windows but I'm currently testing the options with my Mac(Lion).

metaskills commented 13 years ago

You should really check out the README and look around :) Also, when I have top level questions about gems, I look on rubygems.org too.

http://rubygems.org/gems/tiny_tds/ http://rubygems.org/gems/tiny_tds/versions

Closing.

plentz commented 13 years ago

related #37

Gerhardk commented 12 years ago

I am getting the same error on my windows environment.

I have looked at the freetds and there is no download for windows but there is a jtds that runs on windows

metaskills commented 12 years ago

I used to test building in jruby awhile ago but have not found the time. I know they hated doing c-extension support in the first place and recommended against it. Perhaps you can try installing either an older version of TinyTDS like 0.4.5 or maybe even just testing building your own static gem using the instructions I provided in the read me.

metaskills commented 12 years ago

On the flip side, I wish someone would step up to this ticket. https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/106

Gerhardk commented 12 years ago

Thanks for reply it would be nice if some one can attend to it because I have datetime issue with the activerecord-jdbc-adapter and want to move any from it.

metaskills commented 12 years ago

Well we have native Windows gems just for Ruby 1.8.7/1.9.2 that are part of the RailsInstaller project and you can just gem install and get the updated versions. So if not using jRuby was an option, there is your solution.

Gerhardk commented 12 years ago

The thing is I must run Jruby but thanks anyway