Error loading "mysqlplus" under Ruby1.9.1

  • Thread starter Iñaki Baz Castillo
  • Start date
I

Iñaki Baz Castillo

Hi, I've ruby1.8.7 and 1.9.1 installed. In both I've the gems:
=2D mysql (2.8.1)
=2D 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.


=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
 
I

Iñaki Baz Castillo

El Jueves, 17 de Diciembre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
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)
=20
When I require mysqlplus in 1.8 it is correctly loaded.
=20
However in Ruby 1.9 I get this error:
=20
LoadError: error loading mysqlplus--this may mean you ran a require
'mysql' before a require 'mysqplus', which much come first
=20
Inspecting the code I've realized when myslplus library does:
=20
class Mysql
[...]
begin
alias_method :async_query, :c_async_query
=20
=20
I've no idea but in Ruby1.9 fails with same gems installed than in Ruby1.= 8.
=20
Any help please? Thanks a lot.

I've found the issue and posted in the project tracker:

http://github.com/oldmoe/mysqlplus/issues/#issue/2


=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
 
L

Luis Lavena


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?

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'
 
I

Iñaki Baz Castillo

El S=E1bado, 19 de Diciembre de 2009, Luis Lavena escribi=F3:
=20
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"?
=20
Or do something else prior calling the require 'mysql'

Tha main goal is that "require 'mysql'" returns false if "require 'mysqlplu=
s'"=20
was called first. However I think this is not possible, am I wrong?

Thanks a lot.

=2D-=20
I=F1aki Baz Castillo <[email protected]>
 
R

Roger Pack

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top