Segfault when requiring both mysql and mechanize

Hello, there’s a simple script

require ‘rubygems’
require ‘mysql’
require ‘mechanize’ #it works if I delete this string

m = Mysql.new(‘localhost’, ‘h3’, ‘h3’, ‘h3’)

that fails with

C:/Program Files/ActiveState Komodo IDE
5/lib/support/dbgp/rubylib/rdbgp/processor.rb:370: [BUG] Segmentation
fault
ruby 1.8.6 (2008-08-11) [i386-mswin32]

but, doesn’t fail if I comment out the string requiring mechanize. How
can I fix it? TIA

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

What about with a newer version of ruby?
-=r

I am having the same problem in 1.9 however I don’t use mechanize. My
script worked fine in version 1.8.6 but after the upgrade generates a
segmentation fault:

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

– control frame ----------
c:0005 p:-2710104 s:0031 b:0031 l:000030 d:000030 TOP
c:0004 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :require
c:0003 p:0023 s:0025 b:0025 l:000e5c d:000168 EVAL lib/rssbuilder.rb:5
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000e5c d:000e5c TOP :427

– Ruby level backtrace
information-----------------------------------------
lib/rssbuilder.rb:5:in require' lib/rssbuilder.rb:5:in

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Rod D. wrote:

Hello, there’s a simple script

require ‘rubygems’
require ‘mysql’
require ‘mechanize’ #it works if I delete this string

m = Mysql.new(‘localhost’, ‘h3’, ‘h3’, ‘h3’)

that fails with

C:/Program Files/ActiveState Komodo IDE
5/lib/support/dbgp/rubylib/rdbgp/processor.rb:370: [BUG] Segmentation
fault
ruby 1.8.6 (2008-08-11) [i386-mswin32]

but, doesn’t fail if I comment out the string requiring mechanize. How
can I fix it? TIA

There are no binaries for the Windows version greater than 1.9.1.

I tried installing 1.8.7 but the windows distribution seems incomplete.

Other scripts work fine in 1.9.

Roger P. wrote:

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

What about with a newer version of ruby?
-=r

I’m getting the same problem with 1.9.1 p129

Roger P. wrote:

Mike W. wrote:

There are no binaries for the Windows version greater than 1.9.1.

I was thinking more of a higher patch level.
-=r

On Jun 19, 3:45 pm, Mike W. [email protected] wrote:

I am having the same problem in 1.9 however I don’t use mechanize. My
script worked fine in version 1.8.6 but after the upgrade generates a
segmentation fault:

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql .so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

How did you upgraded your Ruby? Also, did you build from source mysql
gem?

AFAIK the binary version of mysql gem is only for 1.8, and can’t
work with 1.9 without being recompiled and linked to Ruby 1.8 runtime/
shared library.

Mike W. wrote:

There are no binaries for the Windows version greater than 1.9.1.

I was thinking more of a higher patch level.
-=r