Error installing gem "mysql" in Ruby 1.9.1


#1

Hi, trying to install gem “mysql” in Ruby 1.9.1 I get an error:

error: ‘struct RString’ has no member named ‘ptr’

This is due to RString changes from Ruby 1.8 (now in 1.9.1
RSTRING_PTR(arg)
must be used instead of RSTRING(arg)->ptr).

What can I do to get mysql working in Ruby 1.9.1? where can I get an
updated
MySQL driver?

Thanks a lot.


#2

El Sábado 04 Abril 2009, Iñaki Baz C. escribió:

Hi, trying to install gem “mysql” in Ruby 1.9.1 I get an error:

error: ‘struct RString’ has no member named ‘ptr’

This is due to RString changes from Ruby 1.8 (now in 1.9.1 RSTRING_PTR(arg)
must be used instead of RSTRING(arg)->ptr).

What can I do to get mysql working in Ruby 1.9.1? where can I get an
updated MySQL driver?

I’ve got it from here:
http://github.com/radar/mysql/tree/master

and also good doc about this issue here:
http://frozenplague.net/2009/01/ruby-191-rubygems-rails/