gpt4 book ai didi

ruby - 我无法获得适用于 Windows XP 的 ruby​​ 开发工具包

转载 作者:数据小太阳 更新时间:2023-10-29 07:14:53 25 4
gpt4 key购买 nike

所以,我一辈子都无法让它正常工作。我的最终目标是安装并运行 dbd-odbc gem,根据我阅读的多篇文章,我需要安装 ODBC binding对于 ruby​​ 和 dbd-odbc gem。好吧,我可以很好地安装 dbd-odbc gem,但是当涉及到尝试安装绑定(bind)时,它像这样对我不利:

Building native extensions.  This could take a while...ERROR:  Error installing ruby-odbc-0.9998.gem:        ERROR: Failed to build gem native extension.`c:/tools/ruby/ruby-1.9.1-p376/bin/ruby.exe extconf.rbchecking for version.h... *** 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        --srcdir=.        --curdir        --ruby=c:/tools/ruby/ruby-1.9.1-p376/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}/libc:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:364:in 'try_do': The complier failed to generate an executable file. (RuntimeError)  You have to install development tools first.          from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:433:in 'try_cpp'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:811:in 'block in have_header'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:670:in 'block in checking_for'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:276:in 'block (2 levels) in postpone'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:250:in 'open'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:276:in 'block in postpone'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:250:in 'open'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:272:in 'postpone'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:669:in 'checking_for'        from c:/tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb:810:in 'have_header'        from extconf.rb:22:in ''

所以...仔细阅读它,它说我必须先安装开发工具。很好,花花公子。我去here ,并获取开发工具包。我流浪here ,并通读有关如何安装它的说明。我安装它。
附带一提 - 我已经通过从 ruby​​ 安装程序站点单击安装 1.9.1 来尝试此操作。我已经在 1.8.6、1.8.7 和 1.9.1 下使用预编译的 mswin-32 ruby​​ 二进制文件进行了尝试。他们都没有工作。
我会坚持使用一键式安装程序,因为我在网上看到的所有说明似乎都在使用它。美好的。它说要编辑我的 fstab 文件。我愿意。这是我当前的设置:
我的 ruby​​ 安装位于:C:\tools\ruby\ruby19 devkit 已经解压缩到这个目录中,我可以检查/bin 并看到 gcc.bat、make.bat 和 sh。 bat 在那里。
我按照说明修改我的 devkit/msys/1.0.11/etc/fstab 文件。现在看起来像这样:
C:/tools/ruby/ruby19/devkit/gcc/3.4.5/mingw
C:/tools/ruby/ruby19/devkit/msys/1.0.11/usr/local/usr/local

无论我做什么,我终其一生都无法将 odbc 绑定(bind) gem 编译为 native 扩展。我一遍又一遍地收到同样的错误。这让人非常沮丧 - 请帮忙!

最佳答案

你在自杀。

For Win32 operating systems DLLs of 0.997 are available in i386-msvcrt-ruby-odbc.zip. It contains the files odbc.so and odbc_utf8.so which need to be copied into the .../ruby/1.8/i386-msvcrt directory of MSVC based Ruby 1.8 installations.

尝试将这些文件放在推荐的位置,然后安装该版本的 gem,看看效果如何。

关于ruby - 我无法获得适用于 Windows XP 的 ruby​​ 开发工具包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2283145/

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