0

サーバーを実行しているときに、コンソールに次のエラーが表示されます:----

C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in require': no such file to load -- mysql2/mysql2 (LoadError) from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/m ysql2.rb:9:in' from C:/Ruby192/lib/ruby/gems/1.9 .1/gems/bundler-1.1.5/lib/bundler/runti me.rb:68: require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:68:inC:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler の「require」内のブロック (2 レベル) -1.1.5/lib/bundler/runtime.rb:66: each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:66:inrequire のブロック内 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti からme.rb:55:in each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:55:inrequire' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:11 9:in require' from D:/usr/barun/project/rails/forum web service/dummy/config/applicati on.rb:7:in' from C:/Ruby192/ lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:53:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:53:inblock in ' from C:/Ruby192/lib/ruby/gems/1.9.1/gems /railties-3.2.5/lib/rails/comman ds.rb:50:in tap' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:50:in' from script/rails:6:でrequire' from script/rails:6:in'

このエラーを解決する方法がわかりません...助けてください

4

1 に答える 1

0

私は同じ問題を抱えていました。次の解決策は私のために働いた

Solution: the libmysql.dll file is located in the bin directory of your mysql installation. This file needs to be a copy of it in the Ruby\bin directory.
于 2012-07-25T09:18:45.427 に答える