Hi Jean-Denis,

I can't answer your question directly but I may be able to help a bit. I also 
want to use mysql with `MacRuby.  I tried mysql gem version 2.8.1 and hit 
problems I couldn't work around.  I also tried ruby-mysql 2.9.4.  I did get 
that to work after some mods, but it was very slow to load and didn't seem 
totally reliable.

I then decided to use an Objective-C framework that accesses SQL.  Sequel Pro 
contains such a framework called MCPKit and it's open source.  This means no 
gems so it loads v quickly.  However, the version of MCPKit that I downloaded 
had manual memory management so wouldn't link with a MacRuby app.  I don't know 
much about Objective-C but I thought I would just try recompiling MCPKit with 
ARC and garbage collection.  To my surprise and delight it worked.  I'm afraid 
I don't know how robust this approach is likely to be.  Maybe I've just been 
lucky.  It would be interesting to hear from someone who understands memory 
management better than me.

Steve


On 16 Nov 2011, at 15:33, Jean-Denis MUYS wrote:

> Hi,
> 
> I have a big showstopper with my app: sequel with the mysql gem fails with 
> the following error message:
> 
> dyld: Symbol not found: _rb_str_freeze
> Referenced from: /Library/Frameworks/MacRuby.frameword/[…]/mysql_api.bundle
> 
> This is mentioned on the net on the sequel project back in february. The 
> diagnostic of the sequel developer was that this is a bug in MacRuby.
> 
> I am using MacRuby nightly latest as of November 17, 2011, which reports its 
> version as 0.12
> I have mysql gem version 2.8.1
> I have sequel gem version 3.29.0
> 
> Steps to reproduce in macirb:
> 
>       require 'ruby gems'
>       require 'sequel'
>       DB = Sequel.connect(:adapter => 'mysql', :user => 'root', :host => 
> 'localhost', :database => 'test', :password => 'your password')
>       DB.tables
> 
> Is there any workaround/ easy fix?
> 
> I would appreciate any suggestion, including of alternate gems to use.
> 
> Jean-Denis
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to