2011-08-07 77 views
0

我已成功在我的Mac安裝free_tds並可以使用T-SQL來訪問數據庫和查詢表tiny_tds寶石。 然而,當我嘗試使用寶石tiny_tds上軌3寶石,我得到以下錯誤:問題在安裝導軌3

Installing tiny_tds (0.4.5) with native extensions /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

     /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
extconf.rb:12: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 
looking for library directory /Users/gugguson/.rvm/gems/[email protected]/lib ... no 
looking for library directory /Users/gugguson/.rvm/gems/[email protected]/lib/freetds ... no 
looking for library directory /Users/gugguson/.rvm/gems/[email protected]/lib ... no 
looking for library directory /Users/gugguson/.rvm/gems/[email protected]/lib/freetds ... no 
looking for library directory /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib ... yes 
checking for main() in -lsybdb... no 
looking for library directory /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/freetds ... no 
looking for library directory /Users/gugguson/.rvm/lib ... yes 
checking for main() in -lsybdb... no 
looking for library directory /Users/gugguson/.rvm/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 
----- 
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/gugguson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby 
    --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 
looking for library directory /usr/X11/lib/freetds ... no 


Gem files will remain installed in /Users/gugguson/.rvm/gems/[email protected]/gems/tiny_tds-0.4.5 for inspection. 
Results logged to /Users/gugguson/.rvm/gems/[email protected]/gems/tiny_tds-0.4.5/ext/tiny_tds/gem_make.out 
    from /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:530:in `block in build_extensions' 
    from /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `each' 
    from /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `build_extensions' 
    from /Users/gugguson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `block in install' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `block (2 levels) in run' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `block in run' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `block in each' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/cli.rb:270:in `update' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start' 
    from /Users/gugguson/.rvm/gems/[email protected]/gems/bundler-1.0.15/bin/bundle:13:in `<top (required)>' 
    from /Users/gugguson/.rvm/gems/[email protected]/bin/bundle:19:in `load' 
    from /Users/gugguson/.rvm/gems/[email protected]/bin/bundle:19:in `<main>' 

有誰知道什麼可導致此?

回答

2

消息Can not find FreeTDS's db-lib or include directory說,你必須安裝freetds的。

如果您使用的自制軟件可以輕鬆地安裝freetds的是這樣的:

brew install freetds 

希望它能幫助。

0

或者在Linux中安裝freetds的是這樣的:

sudo apt-get install freetds-dev 

:)