mysql-ruby on cygwin

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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: ...
    3. 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!
    4. 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...
    5. 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")...
  3. #2

    Cool 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139