Ask a Question related to Ruby, Design and Development.
-
Steven Jenkins #1
mysql-ruby on cygwin
As the subject says.
Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4
Cygwin DLL version 1.5.5
First of all, Ruby works:
$ ruby -v
ruby 1.8.0 (2003-08-04) [i386-cygwin]
And the mysql client works:
$ mysql --password=********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 270 to server version: 4.0.14
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
And I have mysql-ruby installed:
$ ruby -e 'p $:'
["/usr/lib/ruby/site_ruby/1.8",
"/usr/lib/ruby/site_ruby/1.8/i386-cygwin", "/usr/lib/ruby/site_ruby",
"/usr/lib/ruby/1.8", "/usr/lib/ruby/1.8/i386-cygwin", "."]
$ ls -l /usr/lib/ruby/site_ruby/1.8/i386-cygwin
total 107
-r-xr-xr-x 1 sjenkins mkgroup_ 109568 Nov 6 13:39 mysql.so
But when I try to load it, I get this:
$ irb
irb(main):001:0> require 'mysql'
LoadError: dlopen: Win32 error 126 -
/usr/lib/ruby/site_ruby/1.8/i386-cygwin/mysql.so
from /usr/lib/ruby/site_ruby/1.8/i386-cygwin/mysql.so
from (irb):1
irb(main):002:0>
From what I read on the web, error 126 is often caused by attempting to
load a library that depends on other libraries that can't be found.
Snooping a little:
$ strings mysql.so|grep dll
cygwin-ruby16.dll
cygwin1.dll
The closest thing I have to cygwin-ruby16.dll is /usr/bin/cygruby18.dll.
So I figure I'll just recompile mysql-ruby from source. The mysql
libraries are here:
$ ls /cygdrive/c/mysql/lib/opt
libmySQL.a@ libmySQL.lib mysys-max.lib regex.lib zlib.lib
libmySQL.dll mysqlclient.lib mysys.lib strings.lib
So I try this:
$ ruby extconf.rb --with-mysql-lib=/cygdrive/c/mysql/lib/opt
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
I'm out of ideas. Any suggestions?
Steve
Steven Jenkins Guest
-
Self compiled ruby (cygwin) + ruby-dbi + mysql...stuck.
I'm trying to get a self-compiled ruby under cygwin to work with the binary Windows distribution of mysql; either via ruby-mysql or dbi/dbd. I... -
mysql-ruby 1.4.5 bug?
Hi, I am using mysql 4.0.15 on redhat 9.0, compiled ruby 1.80,compiled mysql-ruby 1.4.5 and tested it with the following result: ... -
ruby-mysql-0.2.1 and DBI
Has anyone tried to interface ruby-mysql-0.2.1 with DBI with Ruby1.8? What is involved? Thanks! -
Problems with the Ruby MySQL Interface 2.4.4a and Ruby 1.8.0 on OS X
Hola. The Ruby MySQL Interface 2.4.4a package compiles fine with Ruby 1.8.0 on the OS X 10.2.6 I'm running, but as soon as I try to run the test... -
cygwin-provided ruby 1.6.8's map/chomp can't remove dos newlines?!
user@HOST ~/julia/proj $ cat keynames.txt julia justin user@HOST ~/julia/proj $ cat blah.rb keynames = IO.readlines("keynames.txt")... -
Unregistered #2
Re: mysql-ruby on cygwin
guys, MySQL on Cygwin - SOLVED
Please refer to the solution here and you should be able to install MySQL without any issues
http://www.way2dms.com/2011/07/542/Unregistered Guest



Reply With Quote

