# Error installing gem "mysql" in Ruby 1.9.1

**URL:** <https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709>\
**Category:** Ruby\
**Created:** [April 4, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709 "2009-04-04T14:48:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 4, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709/1 "2009-04-04T14:48:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 4, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709/2 "2009-04-04T14:59:46Z")

</div>

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](http://github.com/radar/mysql/tree/master)

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