[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Leopard + mysql

X43 X43

10/29/2007 1:34:00 PM

Hello:

I am trying to connect to a remote mysql server via ruby with require
mysql tag.

I am seeing the following error :

dbconnect.rb:4:in `require': no such file to load -- mysql (LoadError)
from dbconnect.rb:4


Any thoughts ?

thanks
--
Posted via http://www.ruby-....

6 Answers

Michael Steinfeld

10/29/2007 4:41:00 PM

0

did you install the mysql adapter gem?

On 10/29/07, X43 X43 <a43131@yahoo.com> wrote:
> Hello:
>
> I am trying to connect to a remote mysql server via ruby with require
> mysql tag.
>
> I am seeing the following error :
>
> dbconnect.rb:4:in `require': no such file to load -- mysql (LoadError)
> from dbconnect.rb:4
>
>
> Any thoughts ?
>
> thanks
> --
> Posted via http://www.ruby-....
>
>


--
Michael Steinfeld
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: mikeisgreat@gmail.com

X43 X43

10/29/2007 6:48:00 PM

0

Michael Steinfeld wrote:
> did you install the mysql adapter gem?

That's where the problem is coming. I tried doing that in both manner:

gem install mysql

and as shown here :
http://www.notsostupid.com/blog/2007/10/25/ruby-leopard...


Both result in :

Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***

Appreciate your response. Thanks in advance.
Aashish
--
Posted via http://www.ruby-....

Michael Steinfeld

10/29/2007 7:31:00 PM

0

Did you install MySQL? Binary or Source? Even if you are connecting to
a remote database, you are still going to have to have mysql header
files and libs installed.

On 10/29/07, X43 X43 <a43131@yahoo.com> wrote:
> Michael Steinfeld wrote:
> > did you install the mysql adapter gem?
>
> That's where the problem is coming. I tried doing that in both manner:
>
> gem install mysql
>
> and as shown here :
> http://www.notsostupid.com/blog/2007/10/25/ruby-leopard...
>
>
> Both result in :
>
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install mysql
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lm... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lz... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lsocket... no
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lnsl... no
> checking for mysql_query() in -lmysqlclient... no
> *** extconf.rb failed ***
>
> Appreciate your response. Thanks in advance.
> Aashish
> --
> Posted via http://www.ruby-....
>
>


--
Michael Steinfeld
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: mikeisgreat@gmail.com

X43 X43

10/29/2007 7:34:00 PM

0

Michael Steinfeld wrote:
> Did you install MySQL? Binary or Source? Even if you are connecting to
> a remote database, you are still going to have to have mysql header
> files and libs installed.

NO I haven't installed MYSQL ( Binary/libraries/header files). Do you
mean a *full* mysql install ? Or are there drivers available ??


--
Posted via http://www.ruby-....

Laurent Sansonetti

10/29/2007 9:10:00 PM

0

On Oct 29, 2007 8:34 PM, X43 X43 <a43131@yahoo.com> wrote:
> Michael Steinfeld wrote:
> > Did you install MySQL? Binary or Source? Even if you are connecting to
> > a remote database, you are still going to have to have mysql header
> > files and libs installed.
>
> NO I haven't installed MYSQL ( Binary/libraries/header files). Do you
> mean a *full* mysql install ? Or are there drivers available ??
>

So, you need to install MySQL first. You can grab a binary installer
from mysql.com for your architecture.

Then, in order to install the Ruby bindings, follow the steps here:

http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#IcannotbuildrubymysqlonLeopardwithmysql.c...

Please tell us if this doesn't work for you.

Laurent

X43 X43

10/29/2007 10:42:00 PM

0

Laurent Sansonetti wrote:
> http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#IcannotbuildrubymysqlonLeopardwithmysql.c...
>
> Please tell us if this doesn't work for you.
>
> Laurent


This works!!! Thanks Laurent.

Aashish
--
Posted via http://www.ruby-....