[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

install mysql-ruby on RHEL

Richard Navarrete

2/4/2006 3:58:00 PM

Howdy,

I've successfully installed ruby-rails-mysql on my powerbook, on our
Windows server, but am missing something on our Linux box.

Ruby is installed (1.8.4), so is rails (0.8.11). And I got the
"Congratulations, you put Ruby on Rails!" screen. I have MySQL
already installed (it's been there for a long time), version 4.0.25).

Now, I need to install the driver for MySQL/Ruby (mysql-ruby-2.7).
Here's how the progression goes:

<code>

[richard@www mysql-ruby-2.7]$ ruby ./extconf.rb --with-mysql-dir=/usr
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile

[richard@www mysql-ruby-2.7]$ make
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/
local/lib/ruby/1.8/i686-linux -I. -DHAVE_MYSQL_SSL_SET -
DHAVE_MYSQL_MYSQL_H -I/usr/include -c mysql.c
gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/
usr/local/lib' -o mysql.so mysql.o -lmysqlclient -ldl -lcrypt -lm
-lc

[richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root
<myrootpass> test
/test.rb:143: undefined method `client_version' for Mysql:Class
(NoMethodError)

</code>

BTW, I created an empty database called `test`.

Anyone had a similar experience? Any ideas?

Cheers,
Richard



9 Answers

Oliver Andrich

2/4/2006 4:28:00 PM

0

Hi,

I just packaged mysql-ruby for Fedora Core and in my SPEC file I use

ruby extconf.rb --with-mysql-config

This does the trick for me on Fedora Core 4. And I guess it would also
do the trick on a RHEL server. At least it does so for me using RHEL 3.

Kind regards,
Oliver

--
Oliver Andrich --- oliver.andrich@gmail.com --- http://rou...


Richard Navarrete

2/4/2006 5:08:00 PM

0

Thanks, Oliver.

I don't have a mysql_config, not sure why. But, I noticed it wasn't
finding the header file (mysql.h), so I ran this:

[richard@www mysql-ruby-2.7]$ make clean
[richard@www mysql-ruby-2.7]$ ruby ./extconf.rb --with-mysql-dir=/usr
--with-mysql-include=/usr/include/mysql
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile

This time if found it.

[richard@www mysql-ruby-2.7]$ make
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/
local/lib/ruby/1.8/i686-linux -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H
-I/usr/include/mysql -I/usr/include -c mysql.c
gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/
usr/local/lib' -o mysql.so mysql.o -lmysqlclient -ldl -lcrypt -lm
-lc
[richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root ertgnhbr
/test.rb:143: undefined method `client_version' for Mysql:Class
(NoMethodError)

Same error.

Could my compiler be the problem?

gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

Thanks,
Richard



On Feb 4, 2006, at 10:28 AM, Oliver Andrich wrote:

> Hi,
>
> I just packaged mysql-ruby for Fedora Core and in my SPEC file I use
>
> ruby extconf.rb --with-mysql-config
>
> This does the trick for me on Fedora Core 4. And I guess it would also
> do the trick on a RHEL server. At least it does so for me using
> RHEL 3.
>
> Kind regards,
> Oliver
>
> --
> Oliver Andrich --- oliver.andrich@gmail.com --- http://rou...
>



Derek Chesterfield

2/4/2006 5:18:00 PM

0

I don't know what is wrong in your case. However, in my case, I
wanted a newer version of MySQL than came with RHEL (RHEL4 has MySQL
v4 - I wanted v5), so I installed a new MySQL from sources into /usr/
local).

Then I did 'gem install mysql -- --with-mysql-dir=/usr/local', and
everything built fine.

On 4 Feb 2006, at 3:58pm, Richard Navarrete wrote:

> Howdy,
>
> I've successfully installed ruby-rails-mysql on my powerbook, on
> our Windows server, but am missing something on our Linux box.
>
> Ruby is installed (1.8.4), so is rails (0.8.11). And I got the
> "Congratulations, you put Ruby on Rails!" screen. I have MySQL
> already installed (it's been there for a long time), version 4.0.25).
>
> Now, I need to install the driver for MySQL/Ruby (mysql-ruby-2.7).
> Here's how the progression goes:
>
> <code>
>
> [richard@www mysql-ruby-2.7]$ ruby ./extconf.rb --with-mysql-dir=/usr
> checking for mysql_query() in -lmysqlclient... yes
> checking for mysql_ssl_set()... yes
> checking for mysql.h... no
> checking for mysql/mysql.h... yes
> creating Makefile
>
> [richard@www mysql-ruby-2.7]$ make
> gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/
> local/lib/ruby/1.8/i686-linux -I. -DHAVE_MYSQL_SSL_SET -
> DHAVE_MYSQL_MYSQL_H -I/usr/include -c mysql.c
> gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-
> R'/usr/local/lib' -o mysql.so mysql.o -lmysqlclient -ldl -lcrypt -
> lm -lc
>
> [richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root
> <myrootpass> test
> ./test.rb:143: undefined method `client_version' for Mysql:Class
> (NoMethodError)
>
> </code>
>
> BTW, I created an empty database called `test`.
>
> Anyone had a similar experience? Any ideas?
>
> Cheers,
> Richard
>
>



Oliver Andrich

2/4/2006 5:36:00 PM

0

Hi,

I just checked on my RHEL boxes, and even your method to compile the
module works fine there. What version of MySQL are you using and from
which source did you take it? Official MySQL rpm files from mysql.com?
Self-compiled?

The first strange thing in my eyes is, that mysql_config is not there.
Every rpm I know of installs it in /usr/bin as part of the basic MySQL
package. ANd the second strange thing is the error while running your
test code.

> [richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root ertgnhbr
> ./test.rb:143: undefined method `client_version' for Mysql:Class
> (NoMethodError)

I don't think that the compiler is the source of your problems. Can you
supply the MySQL version and from where you have taken it? Or where it
is installed?

Regards,
Oliver

--
Oliver Andrich --- oliver.andrich@gmail.com --- http://rou...


Richard Navarrete

2/4/2006 7:05:00 PM

0

Hey Oliver,

I'm using 4.0.25 and I think it's self compiled or came installed
already. Unfortunately, I can't remember if I installed it by hand,
but for sure it wasn't using RPMs, because I don't see such tracings
in /usr/src/redhat...

I'm still checking to see how MySQL got there. heh

So, I assume by your comment that all mysql installations should have
a mysql_config?

Here are a few mysql files/folders I found on my system:

/usr/bin/safe_mysqld
/usr/bin/mysql ...mysqldump, etc
/usr/include/mysql/libmysqlclient.so
/usr/include/mysql/libmysqlclient.so.10
/usr/include/mysql
/usr/lib/libmysqlclient.so
/usr/lib/libmysqlclient.so.10
/usr/lib/libmysqlclient.so.12
/usr/lib/libmysqlclient_r.so
/usr/lib/libmysqlclient_r.so.10
/usr/lib/libmysqlclient_r.so.12
/usr/lib/mysql
/usr/lib/libmysqlclient.so.10.0.0
/usr/lib/libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient_r.so.10.0.0
/usr/lib/libmysqlclient_r.so.12.0.0

/usr/sbin/mysqld
/usr/share/mysql

I'll see if I can find out how it was installed...

Thanks,
Richard

On Feb 4, 2006, at 11:36 AM, Oliver Andrich wrote:

> Hi,
>
> I just checked on my RHEL boxes, and even your method to compile the
> module works fine there. What version of MySQL are you using and from
> which source did you take it? Official MySQL rpm files from mysql.com?
> Self-compiled?
>
> The first strange thing in my eyes is, that mysql_config is not there.
> Every rpm I know of installs it in /usr/bin as part of the basic MySQL
> package. ANd the second strange thing is the error while running your
> test code.
>
>> [richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root ertgnhbr
>> ./test.rb:143: undefined method `client_version' for Mysql:Class
>> (NoMethodError)
>
> I don't think that the compiler is the source of your problems. Can
> you
> supply the MySQL version and from where you have taken it? Or where it
> is installed?
>
> Regards,
> Oliver
>
> --
> Oliver Andrich --- oliver.andrich@gmail.com --- http://rou...
>



Logan Capaldo

2/5/2006 3:29:00 AM

0


On Feb 4, 2006, at 2:04 PM, Richard Navarrete wrote:

> Hey Oliver,
>
> I'm using 4.0.25 and I think it's self compiled or came installed
> already. Unfortunately, I can't remember if I installed it by
> hand, but for sure it wasn't using RPMs, because I don't see such
> tracings in /usr/src/redhat...
>
> I'm still checking to see how MySQL got there. heh
>
> So, I assume by your comment that all mysql installations should
> have a mysql_config?
>
> Here are a few mysql files/folders I found on my system:
>
> /usr/bin/safe_mysqld
> /usr/bin/mysql ...mysqldump, etc
> /usr/include/mysql/libmysqlclient.so
> /usr/include/mysql/libmysqlclient.so.10
> /usr/include/mysql
> /usr/lib/libmysqlclient.so
> /usr/lib/libmysqlclient.so.10
> /usr/lib/libmysqlclient.so.12
> /usr/lib/libmysqlclient_r.so
> /usr/lib/libmysqlclient_r.so.10
> /usr/lib/libmysqlclient_r.so.12
> /usr/lib/mysql
> /usr/lib/libmysqlclient.so.10.0.0
> /usr/lib/libmysqlclient.so.12.0.0
> /usr/lib/libmysqlclient_r.so.10.0.0
> /usr/lib/libmysqlclient_r.so.12.0.0
>
> /usr/sbin/mysqld
> /usr/share/mysql
>
> I'll see if I can find out how it was installed...
>
> Thanks,
> Richard
>
> On Feb 4, 2006, at 11:36 AM, Oliver Andrich wrote:
>
>> Hi,
>>
>> I just checked on my RHEL boxes, and even your method to compile the
>> module works fine there. What version of MySQL are you using and from
>> which source did you take it? Official MySQL rpm files from
>> mysql.com?
>> Self-compiled?
>>
>> The first strange thing in my eyes is, that mysql_config is not
>> there.
>> Every rpm I know of installs it in /usr/bin as part of the basic
>> MySQL
>> package. ANd the second strange thing is the error while running your
>> test code.
>>
>>> [richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root ertgnhbr
>>> ./test.rb:143: undefined method `client_version' for Mysql:Class
>>> (NoMethodError)
>>
>> I don't think that the compiler is the source of your problems.
>> Can you
>> supply the MySQL version and from where you have taken it? Or
>> where it
>> is installed?
>>
>> Regards,
>> Oliver
>>
>> --
>> Oliver Andrich --- oliver.andrich@gmail.com --- http://rou...
>>
>
>

Speaking totally out of my rear end here, but it looks like A) its
installed from an rpm (judging by the directories its installed to)
and B) you need to install the -devel version of the rpm. Of course I
could be completely wrong since its been a long time since A) I've
used Linux and B) I almost always use Debian.


Meiao

2/6/2006 3:20:00 AM

0

That's right, in Debian you need mysqlclient-dev (or whatever was the
name of the package) to compile ruby-mysql.

Richard Navarrete

2/7/2006 12:05:00 AM

0

Success! I spent most of the weekend and today coming back from a
long road.

I went ahead and upgraded from mysql 4.0 to 4.1... I was missing
mysql-devel for starters (as we discussed in this thread).

I ran into lots of issues all of which are unrelated to this forum,
but in the end... having mysql-devel (4.1.16 in my case) and possibly
getting rid of bad glibc libraries, made the installation of mysql-
ruby a breeze.

I used --with-mysql-config... which I had now and it found everything
it needed.

Thank you all for your help!
Richard


On Feb 6, 2006, at 3:09 PM, Logan Capaldo wrote:

>
> On Feb 5, 2006, at 12:07 AM, Richard Navarrete wrote:
>
>> Although I'm not sure why mysql_config isn't there.
>
> Well, mysql_config should only be there after installing the devel
> version, since if it does what I think it does, is show the include
> dir and lib dir for mysql. There wouldn't be any include dirs
> without the devel package, so even it was installed, it wouldn't
> help. At least I think that's what is going on.



nospam

8/10/2009 6:23:00 PM

0

On Mon, 10 Aug 2009 10:56:27 -0700, Wilson Woods <banmilk@hotmail.com>
wrote:

>georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>> On Mon, 10 Aug 2009 09:57:16 -0700, Wilson Woods <banmilk@hotmail.com>
>> wrote:
>>
>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>> On Mon, 10 Aug 2009 09:44:34 -0700, Wilson Woods <banmilk@hotmail.com>
>>>> wrote:
>>>>
>>>>> georgie, whose faggot boy was blown to bits in Iraq (and deserved it), lied:
>>>>>> On Mon, 10 Aug 2009 07:25:30 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>> On Mon, 10 Aug 2009 07:01:40 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>> On Sun, 09 Aug 2009 20:20:34 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>> On Sun, 09 Aug 2009 14:42:36 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>> On Sun, 09 Aug 2009 13:36:16 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>>>> On Sun, 09 Aug 2009 13:14:08 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>>>>>> On Sun, 09 Aug 2009 12:04:50 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>>>>>>>> On Sun, 09 Aug 2009 10:37:48 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>>>>>>>>>> On Sun, 09 Aug 2009 09:58:39 -0700, Wilson Woods <banmilk@hotmail.com>
>>>>>>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> georgie, stupid lying ex-daddy of a dead *faggot* soldier, lied:
>>>>>>>>>>>>>>>>>>>>>>>> ISLAM'S CHOICE: CONVERT, BE ENSLAVED, OR DIE
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> The war has started a long time ago between two civilizations -
>>>>>>>>>>>>>>>>>>>>>>>> between the civilization based on the Bible and between the
>>>>>>>>>>>>>>>>>>>>>>>> civilization based on the Koran. And this must be clear.
>>>>>>>>>>>>>>>>>>>>>>> Racist and xenophobic bullshit.
>>>>>>>>>>>>>>>>>>>>>> Really?
>>>>>>>>>>>>>>>>>>>>> Yes.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> You're boring, you know?
>>>>>>>>>>>>>>>>>>>> bore1 (b?r, b$r), v., bored, bor?ing, n.
>>>>>>>>>>>>>>>>>>>> ?v.t.
>>>>>>>>>>>>>>>>>>> Wrong one. You're dull and uninteresting - that's the one.
>>>>>>>>>>>>>>>>>> Despite being so dull, I seem to be making you dance
>>>>>>>>>>>>>>>>> No. You can't make anyone do anything.
>>>>>>>>>>>>>>>> You're evincing otherwise.
>>>>>>>>>>>>>>> You misused "evince" again, blowjob.
>>>>>>>>>>>>>> The evidence evinces multiple definitions of "war."
>>>>>>>>>>>>> You misused "evince", again, and there is no war on terror.
>>>>>>>>>>>> Evidence evinces otherwise.
>>>>>>>>>>> No, georgie, you stupid blowjob. I figured you out, georgie. Your kids
>>>>>>>>>>> parts are still scattered over there in Iraq, aren't they? Good.
>>>>>>>>>> It's better to fight the war on terror
>>>>>>>>> No such thing.
>>>>>>>> Is too.
>>>>>>> No such thing.
>>>>>> Sho is
>>>>> No such thing, georgie.
>>>> Sho is
>>> No such thing, georgie.
>>
>> War on terror
>
>There is no war on terror, georgie, you fat do-nothing fuck.
>
>
>>>>>>>>>>>>> Oh, and you're not tough - not tough at all, blowjob.
>>>>>>>>>>>> Strange comment from a jihad apologist
>>>>>>>>>>> You're not tough, georgie, and neither was your pup.
>>>>>>>>>> Strange comment from
>>>>>>>>> You're not tough, georgie, and neither was your dead pup.
>>>>>>>> Curious that
>>>>>>> You're not tough, georgie - you're fat and soft. Your boy isn't tough,
>>>>>>> either - he's dead.
>>>>>> So which one will
>>>>> You're not tough, georgie - you're fat and soft. Your boy isn't tough,
>>>>> either - he's dead.
>>>>>
>>>>> Flushed you out, georgie, you fat fuck.
>>>> Will it
>>> Flushed you out, georgie, father-of-dead-queer-soldier.
>>
>> Know that
>
>We all know it, georgie. You're flushed out, again, fatso.

Nevah had chillun m'self .... too damn expensive doncha know.

Now ah admit ah visited yo mom a time or two, right after she got her
first double-wide. But I allus protected m'self.

And ah'm willin to take a DN &A paternity test.