On Mar 4, 12:13 pm, Andy Tinkham <[email protected]> wrote: > I'm trying to get database access set up on my mac book pro for some > automated tests. I've created an ODBC connection (tried using both > Open Link's iODBC and actual technologies' sql server driver - both > were the free versions since I wanted o get one working before paying > for it), which claims to be set up successfully when I click the Test > button in the DSN setup wizard. I've got ruby 1.9.2-p180, sequel > 3.21.0, and I'm trying to connect to a db on an MS SQL Server 2005 > server. I'm using irb for the moment to work out the correct syntax.
With 3.21.0, you are much better off using the new tinytds adapter instead of ODBC. The only issue with this is that you currently need to build a tiny_tds gem from the git master branch and install it. When tiny_tds releases version 0.4.0, this will no longer be necessary. With tiny_tds, you only need to install freetds and configure freetds.conf, then use the freetds.conf section name as your host: tinytds://user:pass@host/database Alternatively, you could use JRuby and the JDBC adapter with the JTDS driver. > In irb, I can create the database object. To verify things worked, I > tried to run DB[:glb_People].count. When I do that (or when I have a > data set from that table that I try to get the count of), I get a > segmentation fault. I've put the details of the seg fault > athttps://gist.github.com/855619 > > I see at the end of the seg fault that this might be a bug in Ruby. > Does anyone have any ideas for things I can look at to confirm if this > is the case, or to figure out what if anything I'm doing wrong? Sequel is pure ruby code, so if anything you are doing in Sequel segfaults, the bug is either in the interpreter or in a C extension library. In this case, it is most likely in the odbc extension. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
