Error loading "mysqlplus" under Ruby1.9.1

Hi, I’ve ruby1.8.7 and 1.9.1 installed. In both I’ve the gems:

  • mysql (2.8.1)
  • mysqlplus (0.1.1)

When I require mysqlplus in 1.8 it is correctly loaded.

However in Ruby 1.9 I get this error:

LoadError: error loading mysqlplus–this may mean you ran a require
‘mysql’ before a require ‘mysqplus’, which much come first

Inspecting the code I’ve realized when myslplus library does:

class Mysql
[…]
begin
alias_method :async_query, :c_async_query

I’ve no idea but in Ruby1.9 fails with same gems installed than in
Ruby1.8.

Any help please? Thanks a lot.

El Jueves, 17 de Diciembre de 2009, Iñaki Baz C. escribió:

Any help please? Thanks a lot.
I’ve found the issue and posted in the project tracker:

Issues · oldmoe/mysqlplus · GitHub

Issues · oldmoe/mysqlplus · GitHub

Anybody have any ideas for this situation.

The goal is that you can have installed a mysqlplus gem and a mysql gem.

Both contain ext/mysql.so

If you were to
require ‘mysqlplus’
then
require ‘mysql’

it would not load the “other gem’s version of mysql.so” [currently it’s
random as to which one gets loaded]?

Any thoughts/clues?
Thanks.
-r

El Sábado, 19 de Diciembre de 2009, Luis L.
escribió:

I would recommend usage of gem “mysqlplus” before the require to make
it work

I don’t understand what you mean with “before the require”. Which
“require”?

Or do something else prior calling the require ‘mysql’

Tha main goal is that “require ‘mysql’” returns false if “require
‘mysqlplus’”
was called first. However I think this is not possible, am I wrong?

Thanks a lot.

On Dec 18, 6:47 pm, Roger P. [email protected] wrote:

then
require ‘mysql’

it would not load the “other gem’s version of mysql.so” [currently it’s
random as to which one gets loaded]?

Any thoughts/clues?

require ‘mysql’ is going to search over installed gems ordered by the
OS and load the specified file.

mysql gem no longer uses the extension as entry point, is mysql.rb

I would recommend usage of gem “mysqlplus” before the require to make
it work

Or do something else prior calling the require ‘mysql’

Tha main goal is that “require ‘mysql’” returns false if “require
‘mysqlplus’”
was called first. However I think this is not possible, am I wrong?

Thanks a lot.

I’m beginning to think that you’re right.
-r