gpt4 book ai didi

ruby-on-rails - ROR + 无法安装 tiny_tds

转载 作者:数据小太阳 更新时间:2023-10-29 06:33:35 27 4
gpt4 key购买 nike

在这里,我试图从 MS-SQL Server 2008 获取数据到我在 Ubuntu 10 上的 Rails 应用程序。但是我无法安装 tiny_tds。我按照 github 上给出的步骤进行操作。但没有回应。请指导我正确设置。

使用的 gem 命令::gem install tiny_tds

还有这个命令::gem install tiny_tds –with-freetds-include=/usr/local/include/freetds –with-freetds-lib=/usr/local/lib

错误:

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

/home/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@rails3/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@rails3/lib/freetds ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@global/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180@global/lib/freetds ... no
looking for library directory /home/.rvm/rubies/ruby-1.9.2-p180/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /home/.rvm/rubies/ruby-1.9.2-p180/lib/freetds ... no
looking for library directory /home/.rvm/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /home/.rvm/lib/freetds ... no
looking for library directory /home/lib ... no
looking for library directory /home/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/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=/home/.rvm/rubies/ruby-1.9.2-p180/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
looking for library directory /usr/lib/freetds ... no
looking for library directory /usr/local/ruby/lib ... no
looking for library directory /usr/local/ruby/lib/freetds ... no


Gem files will remain installed in /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/tiny_tds-0.4.5 for inspection.
Results logged to /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/tiny_tds-0.4.5/ext/tiny_tds/gem_make.out
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `block in install'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `block in run'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `block in each'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/gems/bundler-1.0.15/bin/bundle:13:in `<top (required)>'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/bin/bundle:19:in `load'
from /home/.rvm/gems/ruby-1.9.2-p180@rails3/bin/bundle:19:in `<main>'

最佳答案

您是否在安装 gem 之前安装了 freeTDS?

sudo apt-get install freetds-dev

然后

gem install tiny_tds

关于ruby-on-rails - ROR + 无法安装 tiny_tds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7525109/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com