Project

General

Profile

Actions

Bug #1819

closed

Ruby-1.9.1を使用しDB(MySQL)接続時にエラー

Added by stryh (Ryouhei Saita 斉田) almost 15 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]
[ruby-dev:38914]

Description

=begin
初めて報告させていただきます。

● OS -> Windows XP SP2
● Ruby -> ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]
● dbi -> 0.4.2
● dbd-mysql -> 0.4.3
● MySQL API module for Ruby -> 2.7.3
● DB(MySQL) -> 5.1.34-community

上記のヴァージョン・環境でDB接続をするとエラーが現在発生しています。
接続の確認はirb・Rubyプログラム共に行いましたが、両方エラーが発生します。
因みに1.8.7では正常に動作します。

■ irbでの確認
1 require 'dbi'
2 dbh = DBI.connect('DBI:mysql:[DB名]:[ホスト名]','[user]','[poasswd]')
[]は読み替えてください。

1の箇所ではtrueが返ってきます。
2を実行すると以下のダイアログが表示されます。

「msvcrt-ruby18.dllが見つからなかったため、このアプリケーションを開始できませんでした。
アプリケーションをし直すとこの問題は解決される場合があります。」

トレースは・・・

DBI::InterfaceError: Could not load driver (Could not find driver mysql or mysql (error: 126: 指定されたモジュールが見つかりません。 - RUBY_HOME/lib/ruby/gems/1.9.1/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so))
from RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:318:in rescue in load_driver' from RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:242:in load_driver'
from RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:160:in _get_full_driver' from RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:145:in connect'
from (irb):4
from RUBY_HOME/bin/irb.bat:20:in `'

RUBY_HOMEは読み替えてください。

■ Rubyプログラム
こちらでの確認時のトレースは・・・

RUBY_HOME/lib/ruby/gems/1.9.1/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so: [BUG] Segmentation fault
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

-- control frame ----------
c:0013 p:-4484100 s:0060 b:0060 l:000059 d:000059 TOP
c:0012 p:---- s:0058 b:0058 l:000057 d:000057 CFUNC :require
c:0011 p:0062 s:0054 b:0054 l:000053 d:000053 TOP RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbd/Mysql.rb:39
c:0010 p:---- s:0051 b:0051 l:000050 d:000050 FINISH
c:0009 p:---- s:0049 b:0049 l:000048 d:000048 CFUNC :require
c:0008 p:0084 s:0045 b:0045 l:000030 d:000044 BLOCK RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:251
c:0007 p:0019 s:0034 b:0034 l:000033 d:000033 METHOD RUBY_HOME/lib/ruby/1.9.1/monitor.rb:190
c:0006 p:0012 s:0031 b:0031 l:000030 d:000030 METHOD RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:242
c:0005 p:0031 s:0027 b:0027 l:000026 d:000026 METHOD RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:160
c:0004 p:0022 s:0020 b:0020 l:000019 d:000019 METHOD RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:145
c:0003 p:0035 s:0009 b:0009 l:0005a4 d:001470 EVAL db_conectDBI_mysql.rb:5
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0005a4 d:0005a4 TOP :33

-- Ruby level backtrace information-----------------------------------------
RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbd/Mysql.rb:39:in require' RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbd/Mysql.rb:39:in <top (required)>'
RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:251:in require' RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:251:in block in load_driver'
RUBY_HOME/lib/ruby/1.9.1/monitor.rb:190:in mon_synchronize' RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:242:in load_driver'
RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:160:in _get_full_driver' RUBY_HOME/lib/ruby/site_ruby/1.9.1/dbi.rb:145:in connect'
db_conectDBI_mysql.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

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

RUBY_HOMEは読み替えてください。
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0