Has anyone been able to get Rails talking to Microsoft SQL Server from OSX Snow Leopard? In the past with Leopard, I used the instructions found here: http://wiki.rubyonrails.org/database-support/ms-sql. But with Snow Leopard I get the following error when I try to access an ActiveRecord object: /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/ statement.rb:41: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] Any help is appreciated! Thanks, Tom
If switching to the unixODBC is an option for you, you may try the following. - Install unixODBC. Download it from "http://www.unixodbc.org/" and configure it something like, "./configure --prefix=/usr/local/unixODBC-2.2.14 --enable-gui=no". - Install freeTDS with "./configure --prefix=/usr/local/freetds-0.82 --with-unixodbc=/usr/local/unixODBC-2.2.14". - Configure /usr/local/unixOBCD-2.2.14/etc/odbc.init and odbcinst.ini - Download ruby-odbc-0.9997 from "http://www.ch-werner.de/rubyodbc/", create the Makefile with "ruby extconf.rb --with-odbc-lib=/usr/local/unixODBC-2.2.14/lib", and install Hope it helps. --IJ TomRossi7 wrote:> Has anyone been able to get Rails talking to Microsoft SQL Server from > OSX Snow Leopard? In the past with Leopard, I used the instructions > found here: http://wiki.rubyonrails.org/database-support/ms-sql. But > with Snow Leopard I get the following error when I try to access an > ActiveRecord object: > > /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/ > statement.rb:41: [BUG] Segmentation fault > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] > > Any help is appreciated! > > Thanks, > Tom-- Posted via http://www.ruby-forum.com/.
Have you gotten unixODBC to work on Snow Leopard? On Sep 24, 6:09 am, Iljun Kim <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> If switching to the unixODBC is an option for you, you may try the > following. > > - Install unixODBC. > Download it from "http://www.unixodbc.org/" and configure it something > like, > "./configure --prefix=/usr/local/unixODBC-2.2.14 --enable-gui=no". > > - Install freeTDS with > "./configure --prefix=/usr/local/freetds-0.82 > --with-unixodbc=/usr/local/unixODBC-2.2.14". > > - Configure /usr/local/unixOBCD-2.2.14/etc/odbc.init and odbcinst.ini > > - Download ruby-odbc-0.9997 from "http://www.ch-werner.de/rubyodbc/", > create the Makefile with > "ruby extconf.rb --with-odbc-lib=/usr/local/unixODBC-2.2.14/lib", and > install > > Hope it helps. > --IJ > > TomRossi7 wrote: > > Has anyone been able to get Rails talking to Microsoft SQL Server from > > OSX Snow Leopard? In the past with Leopard, I used the instructions > > found here:http://wiki.rubyonrails.org/database-support/ms-sql. But > > with Snow Leopard I get the following error when I try to access an > > ActiveRecord object: > > > /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/ > > statement.rb:41: [BUG] Segmentation fault > > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] > > > Any help is appreciated! > > > Thanks, > > Tom > > -- > Posted viahttp://www.ruby-forum.com/.
TomRossi7 wrote:> Has anyone been able to get Rails talking to Microsoft SQL Server from > OSX Snow Leopard? In the past with Leopard, I used the instructions > found here: http://wiki.rubyonrails.org/database-support/ms-sql. But > with Snow Leopard I get the following error when I try to access an > ActiveRecord object: > > /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/ > statement.rb:41: [BUG] Segmentation fault > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]I wonder if you seeing a similar issue as with MySQL. Maybe you need to force the C extensions for your gems to compile for your specific platform using ARCHFLAGS: Example: sudo env ARCHFLAGS="-arch x86_64" gem install <gem_name> <options> Make sure the -arch setting is correct for your platform. One of [ i386 (32-bit), x86_64(64-bit), ppc, ppc64 ]. This is only a guess as to the cause of your problem, but maybe something you might want to look into. -- Posted via http://www.ruby-forum.com/.
tomrossi7 wrote:> Have you gotten unixODBC to work on Snow Leopard? >Yes, it worked for me. --IJ -- Posted via http://www.ruby-forum.com/.
pat.mcnally-QgJXc4GwR4t9mwCoug4tZw@public.gmane.org
2009-Sep-24 17:04 UTC
Re: Connecting to MS SQL from Snow Leopard
I''m having the same problem as Tom. I can connect to the SQL Server and run a "select *" from iSQL, so I believe that ruby-odbc bindings are using iODBC instead of unixODBC % tsql -C Compile-time settings (established with the "configure" script) Version: freetds v0.82 freetds.conf directory: /usr/local/Cellar/freetds/0.82/ etc MS db-lib source compatibility: yes Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: 8.0 iODBC: no unixodbc: yes % ruby extconf.rb --with-odbc-dir=/usr/local/lib checking for version.h... yes checking for sql.h... yes checking for sqlext.h... yes checking for SQLTCHAR in sqltypes.h... yes checking for SQLLEN in sqltypes.h... yes checking for SQLULEN in sqltypes.h... yes checking for odbcinst.h... yes checking for SQLAllocConnect() in -lodbc... no checking for SQLAllocConnect() in -liodbc... yes checking for SQLConfigDataSource() in -lodbcinst... no checking for SQLConfigDataSource() in -liodbcinst... yes checking for SQLInstallerError() in odbcinst.h... yes creating Makefile On Sep 24, 5:09 am, Iljun Kim <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> If switching to the unixODBC is an option for you, you may try the > following. > > - Install unixODBC. > Download it from "http://www.unixodbc.org/" and configure it something > like, > "./configure --prefix=/usr/local/unixODBC-2.2.14 --enable-gui=no". > > - Install freeTDS with > "./configure --prefix=/usr/local/freetds-0.82 > --with-unixodbc=/usr/local/unixODBC-2.2.14". > > - Configure /usr/local/unixOBCD-2.2.14/etc/odbc.init and odbcinst.ini > > - Download ruby-odbc-0.9997 from "http://www.ch-werner.de/rubyodbc/", > create the Makefile with > "ruby extconf.rb --with-odbc-lib=/usr/local/unixODBC-2.2.14/lib", and > install > > Hope it helps. > --IJ > > TomRossi7 wrote: > > Has anyone been able to get Rails talking to Microsoft SQL Server from > > OSX Snow Leopard? In the past with Leopard, I used the instructions > > found here:http://wiki.rubyonrails.org/database-support/ms-sql. But > > with Snow Leopard I get the following error when I try to access an > > ActiveRecord object: > > > /usr/local/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/ > > statement.rb:41: [BUG] Segmentation fault > > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] > > > Any help is appreciated! > > > Thanks, > > Tom > > -- > Posted viahttp://www.ruby-forum.com/.
Is there a way to use unixODBC without a DSN? On Sep 24, 10:08 am, Iljun Kim <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> tomrossi7 wrote: > > Have you gotten unixODBC to work on Snow Leopard? > > Yes, it worked for me. > > --IJ > -- > Posted viahttp://www.ruby-forum.com/.
I was having this same problem. I switched from iODBC to UNIXODBC and this problem went away for me! Thanks for your help!
Can you post how you set up unixodbc to resolve the issue? On Sun, Oct 4, 2009 at 10:49 AM, Fuse <flimweed-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I was having this same problem. > > I switched from iODBC to UNIXODBC and this problem went away for me! > > Thanks for your help! > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---