[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

MySQL/Ruby Module

Justin To

7/5/2008 4:01:00 AM

After downloading the mysql-ruby-2.8pre4 from
[http://tmtm.org/downloads/m...]...I stuck it into
C:\ruby\lib\mysql-ruby-2.8pre4.

The instructions on http://www.tmtm.org/en/m... says I need to
run the command % ruby extconf.rb:

checking for main() in libmysql.lib... no

is the error that I get.

I need to access MySQL with Ruby, but I keep running into all sorts of
problems!

Thanks for the help!
--
Posted via http://www.ruby-....

4 Answers

hemant

7/5/2008 7:28:00 AM

0

On Sat, Jul 5, 2008 at 9:30 AM, Justin To <tekmc@hotmail.com> wrote:
> After downloading the mysql-ruby-2.8pre4 from
> [http://tmtm.org/downloads/m...]...I stuck it into
> C:\ruby\lib\mysql-ruby-2.8pre4.
>
> The instructions on http://www.tmtm.org/en/m... says I need to
> run the command % ruby extconf.rb:
>
> checking for main() in libmysql.lib... no
>
> is the error that I get.
>
> I need to access MySQL with Ruby, but I keep running into all sorts of
> problems!
>

You need mysql client libraries and header files. On ubuntu hardy, I
would get them with:

apt-get install mysql-common mysql-client libmysqlclient15-dev

Luis Lavena

7/5/2008 9:18:00 AM

0

On Jul 5, 6:00 am, Justin To <te...@hotmail.com> wrote:
> After downloading the mysql-ruby-2.8pre4 from
> [http://tmtm.org/downloads/m...]...I stuck it into
> C:\ruby\lib\mysql-ruby-2.8pre4.
>
> The instructions onhttp://www.tmtm.org/en/mysql... I need to
> run the command % ruby extconf.rb:
>
> checking for main() in libmysql.lib... no
>
> is the error that I get.
>
> I need to access MySQL with Ruby, but I keep running into all sorts of
> problems!
>
> Thanks for the help!

There is a pre-built gem for mysql-ruby for Windows (since It seems
you're trying to get it running there).

gem install mysql and choose latests version (with mswin32 platform)
if you're asked by rubygems.

HTH,
--
Luis Lavena

Justin To

7/6/2008 11:52:00 PM

0

Doesn't seem to work, error with rdoc
--
Posted via http://www.ruby-....

Luis Lavena

7/7/2008 7:35:00 AM

0

On Jul 7, 1:52 am, Justin To <te...@hotmail.com> wrote:
> Doesn't seem to work, error with rdoc

It doesn't say "1 gem installed" ?

Weird, I just had it installed :-P

D.\Users\Luis>gem install mysql
Successfully installed mysql-2.7.3-x86-mswin32
1 gem installed
Installing ri documentation for mysql-2.7.3-x86-mswin32...
Installing RDoc documentation for mysql-2.7.3-x86-mswin32...
ERROR: While generating documentation for mysql-2.7.3-x86-mswin32

But even with the documentation error, still is installed.

HTH,
--
Luis Lavena