运行服务器时出错

时间:2012-07-25 09:11:36

标签: ruby-on-rails

当我运行我的服务器时,我在控制台中收到以下错误:----

C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:在  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:在require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:68:in块中(2级)in require'         来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:66:each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runti me.rb:66:in块中的'需要'         来自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:in要求'         来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:11 9:在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:在require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:53:in块中'         来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:50:tap' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/comman ds.rb:50:in'         来自script / rails:6:require' from script/rails:6:in'

如何解决这个错误我没有得到...... 请帮帮我

1 个答案:

答案 0 :(得分: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.