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'来自 C:/Ruby192/lib/ruby/gems/1.9 .1/gems/bundler-1.1.5/lib/bundler/runti me.rb:68:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:68:inblock (2 levels) in require' 来自 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler -1.1.5/lib/bundler/runti me.rb:66:in each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:66:inblock in require' 来自 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' 来自 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'来自 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 ' 来自 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'来自脚本/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 回答