开发者

Can't get Ruby ODBC bindings to work in 1.8.6 compiled on snow leopard

I have been trying to get ruby 1.8.6 to connect to a MS SQL Server 2005 on Mac OS X snow leopard following the guide here http://wiki.rubyonrails.org/database-support/ms-sql. I have installed the Ruby ODBC Bindings and the dbi and dbd-odbc gems and ruby was com开发者_StackOverflow社区piled from source.

If I run this in irb, DBI.connect('dbi:ODBC:A_DSN', 'USERNAME', 'PWD' ), the ruby process just hangs indefinitely.

I have used gdb to look at the hung process and it is stuck on semaphore_wait_signal_trap.

If I compile ruby 1.8.7 and install the odbc bindings in the same way everything works fine, so I am not sure if it is an issue with compiling the bindings in snow leopard or not. I was able to get this to work on OS X 10.5 and ruby 1.8.6 before upgrading to snow leopard.

Thanks for any light that can be shed!


This looks like the same issue as this: http://www.ruby-forum.com/topic/196606

I'm trying to sort this one out for myself so I'll let you know if I make any progress.

...

I think I'm getting near a solution, but you'll probably have to patch your 1.8.6 source tree before compiling. Looking at dln.c it seems that 1.8.6 uses the deprecated object file image functions NSLinkModule, etc. rather than dlopen. I'm betting that the optimisations for dyld in 10.6 have broken backward compatibility in some way. Therefore I intend to patch my 1.8.6 installation to use dlopen and see whether that fixes the problem.

...

Yep, backporting the dln.c changes from 1.8.7 to 1.8.6 fixes the load problem with RMagick so I'd bet that it would also fix your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜