<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mysql C bindings for Ruby 1.9</title>
	<atom:link href="http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/</link>
	<description>On Ruby, Rails, Concurrency and fiction</description>
	<lastBuildDate>Tue, 13 Sep 2011 22:17:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Aaron</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3294</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Fri, 07 Aug 2009 01:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3294</guid>
		<description>Downloaded the gzip of 2.8.1 from the site fred linked, worked for the 1.9.1 release, Ubuntu jaunty.</description>
		<content:encoded><![CDATA[<p>Downloaded the gzip of 2.8.1 from the site fred linked, worked for the 1.9.1 release, Ubuntu jaunty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry Ezell</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3133</link>
		<dc:creator>Barry Ezell</dc:creator>
		<pubDate>Mon, 08 Dec 2008 16:04:51 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3133</guid>
		<description>Under 1.9.1 preview 2, I encountered an error with both RString (as above) and RArray.  Following instructions regarding RArray here http://www.rubyinside.com/ruby-1-9-1-preview-released-why-its-a-big-deal-1280.html , I modified mysql.c starting on line 1375 as follows:

t.second = FIX2INT(RARRAY_PTR(a)[0]);
t.minute = FIX2INT(RARRAY_PTR(a)[1]);
t.hour = FIX2INT(RARRAY_PTR(a)[2]);
t.day = FIX2INT(RARRAY_PTR(a)[3]);
t.month = FIX2INT(RARRAY_PTR(a)[4]);
t.year = FIX2INT(RARRAY_PTR(a)[5]);

It then compiled and installed correctly.</description>
		<content:encoded><![CDATA[<p>Under 1.9.1 preview 2, I encountered an error with both RString (as above) and RArray.  Following instructions regarding RArray here <a href="http://www.rubyinside.com/ruby-1-9-1-preview-released-why-its-a-big-deal-1280.html" rel="nofollow">http://www.rubyinside.com/ruby-1-9-1-preview-released-why-its-a-big-deal-1280.html</a> , I modified mysql.c starting on line 1375 as follows:</p>
<p>t.second = FIX2INT(RARRAY_PTR(a)[0]);<br />
t.minute = FIX2INT(RARRAY_PTR(a)[1]);<br />
t.hour = FIX2INT(RARRAY_PTR(a)[2]);<br />
t.day = FIX2INT(RARRAY_PTR(a)[3]);<br />
t.month = FIX2INT(RARRAY_PTR(a)[4]);<br />
t.year = FIX2INT(RARRAY_PTR(a)[5]);</p>
<p>It then compiled and installed correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3125</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sat, 29 Nov 2008 20:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-3125</guid>
		<description>you can download the official mysql-ruby-1.8.0 that supports ruby 1.9.0.5

http://rubyforge.org/frs/?group_id=4550</description>
		<content:encoded><![CDATA[<p>you can download the official mysql-ruby-1.8.0 that supports ruby 1.9.0.5</p>
<p><a href="http://rubyforge.org/frs/?group_id=4550" rel="nofollow">http://rubyforge.org/frs/?group_id=4550</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dawid Marcin Grzesiak</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-2538</link>
		<dc:creator>Dawid Marcin Grzesiak</dc:creator>
		<pubDate>Mon, 25 Aug 2008 14:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-2538</guid>
		<description>What helps me was editing &quot;/usr/include/ruby-1.9.0/ruby/ruby.h&quot; (in your case the file is in &quot;/usr/local/include/ruby-1.9.0&quot; dir) file and replacing the RString struct with this code:

struct RString {
    struct RBasic basic;
    union {
        union {
            struct {
                long len;
                char *ptr;
                union {
                    long capa;
                    VALUE shared;
                } aux;
            } heap;
            char ary[RSTRING_EMBED_LEN_MAX];
        } as;

        struct {
            long len;
            char *ptr;
            union {
                long capa;
                VALUE shared;
            } aux;
        };
    };
};

I&#039;ve created empty file &quot;version.h&quot; in the &quot;/usr/include/ruby-1.9.0&quot; dir.

Then I&#039;ve just run &quot;sudo gem1.9 install dbd-mysql&quot; and everything compiled smooth.

Cheers,
Dawid</description>
		<content:encoded><![CDATA[<p>What helps me was editing &#8220;/usr/include/ruby-1.9.0/ruby/ruby.h&#8221; (in your case the file is in &#8220;/usr/local/include/ruby-1.9.0&#8243; dir) file and replacing the RString struct with this code:</p>
<p>struct RString {<br />
    struct RBasic basic;<br />
    union {<br />
        union {<br />
            struct {<br />
                long len;<br />
                char *ptr;<br />
                union {<br />
                    long capa;<br />
                    VALUE shared;<br />
                } aux;<br />
            } heap;<br />
            char ary[RSTRING_EMBED_LEN_MAX];<br />
        } as;</p>
<p>        struct {<br />
            long len;<br />
            char *ptr;<br />
            union {<br />
                long capa;<br />
                VALUE shared;<br />
            } aux;<br />
        };<br />
    };<br />
};</p>
<p>I&#8217;ve created empty file &#8220;version.h&#8221; in the &#8220;/usr/include/ruby-1.9.0&#8243; dir.</p>
<p>Then I&#8217;ve just run &#8220;sudo gem1.9 install dbd-mysql&#8221; and everything compiled smooth.</p>
<p>Cheers,<br />
Dawid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-739</link>
		<dc:creator>Hemant</dc:creator>
		<pubDate>Sat, 02 Feb 2008 05:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-739</guid>
		<description>Awesome, so they fixed mysql binding code to support 1.9.</description>
		<content:encoded><![CDATA[<p>Awesome, so they fixed mysql binding code to support 1.9.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Perham</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-729</link>
		<dc:creator>Mike Perham</dc:creator>
		<pubDate>Fri, 01 Feb 2008 20:35:34 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-729</guid>
		<description>The latest code from here compiles for me.

http://tmtm.org/downloads/mysql/ruby/</description>
		<content:encoded><![CDATA[<p>The latest code from here compiles for me.</p>
<p><a href="http://tmtm.org/downloads/mysql/ruby/" rel="nofollow">http://tmtm.org/downloads/mysql/ruby/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Perham</title>
		<link>http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-728</link>
		<dc:creator>Mike Perham</dc:creator>
		<pubDate>Fri, 01 Feb 2008 20:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2007/12/21/mysql-c-bindings-for-ruby-19/#comment-728</guid>
		<description>Hemant, I get these errors when I try to compile against the 1.9.0 code I just installed:

gcc -I. -I/usr/local/include/ruby-1.9.0/i686-darwin9.1.0 -I/usr/local/include/ruby-1.9.0 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H    -I/usr/local/mysql/include -Os -arch i386 -fno-common -fno-common -g -O2 -pipe -fno-common   -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: No such file or directory
mysql.c: In function ‘escape_string’:
mysql.c:280: error: ‘struct RString’ has no member named ‘len’
mysql.c:281: error: ‘struct RString’ has no member named ‘len’
mysql.c:281: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:281: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:281: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘real_escape_string’:
...

Any ideas?</description>
		<content:encoded><![CDATA[<p>Hemant, I get these errors when I try to compile against the 1.9.0 code I just installed:</p>
<p>gcc -I. -I/usr/local/include/ruby-1.9.0/i686-darwin9.1.0 -I/usr/local/include/ruby-1.9.0 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H    -I/usr/local/mysql/include -Os -arch i386 -fno-common -fno-common -g -O2 -pipe -fno-common   -o mysql.o -c mysql.c<br />
mysql.c:6:21: error: version.h: No such file or directory<br />
mysql.c: In function ‘escape_string’:<br />
mysql.c:280: error: ‘struct RString’ has no member named ‘len’<br />
mysql.c:281: error: ‘struct RString’ has no member named ‘len’<br />
mysql.c:281: error: ‘struct RString’ has no member named ‘ptr’<br />
mysql.c:281: error: ‘struct RString’ has no member named ‘ptr’<br />
mysql.c:281: error: ‘struct RString’ has no member named ‘len’<br />
mysql.c: In function ‘real_escape_string’:<br />
&#8230;</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

