我想要Bundler加载本地gem.那有选择吗?或者我是否必须将gem文件夹移动到.bundle目录中?
在这里,我试图从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 …
Run Code Online (Sandbox Code Playgroud) 我一直在尝试使用OSX 10.6在Macbook上安装TinyTDS gem.我成功安装了免费TDS - 确认它的工作原理是:
tsql -H SERVER -p 1433 -U username.
Run Code Online (Sandbox Code Playgroud)
我从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/jason/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
-----
freetds is missing.
-----
*** extconf.rb failed ***
Could not create Makefile due to some …
Run Code Online (Sandbox Code Playgroud) 我用homebrew(linux端口)来安装freeTDS,我正在尝试使用gem tinytds部署/捆绑安装我的应用程序.在进行bundle安装时我得到了这个错误输出
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
/usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/homebrew/lib/libsybdb.a: could not read symbols: Bad value
Run Code Online (Sandbox Code Playgroud)
非常类似于此修复程序,但我没有在我的文件夹中引用的文件:https://stackoverflow.com/a/7119224/1130736
自制lib文件夹的内容:
/opt/homebrew/lib$ ls
libct.a libsybdb.a
Run Code Online (Sandbox Code Playgroud)
完全错误转储:
full error dump:
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... yes
checking for …
Run Code Online (Sandbox Code Playgroud) 这个问题引发了我这个问题.
我希望能解决我的问题,其中有几个答案详细介绍了一些可以帮助安装的配置参数.这些路径不适合我,所以我修改了它们并最终得到了这个:
gem install tiny_tds -- --with-freetds-include=/usr/local/Cellar/freetds/0.95.21/include
--with-freetds-lib=/usr/local/Cellar/freetds/0.95.21/lib
--with-iconv-include=/usr/local/Cellar/libiconv/1.14/include
--with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
Run Code Online (Sandbox Code Playgroud)
但是,运行它会导致我之前遇到的相同错误.如下:
我之前安装了libiconv和FreeTDS brew
.
有没有人在OS X El Capitan上遇到并解决了这个问题?
如果您想了解更多信息,请询问.