2014-01-24 135 views
2

我得到這個錯誤而使用Rails服務器無法加載這樣的文件 - MySQL的/ mysql_api(LoadError)

C:/Ruby/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:6:in `require': cannot load such file -- mysql/mysql_api (LoadError) 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:6:in `rescue in <top (required)>' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:2:in `<top (required)>' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:131:in `require' 
    from E:/ruby/config/application.rb:7:in `<top (required)>' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap' 
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>' 
    from E:/ruby/bin/rails:4:in `require' 
    from E:/ruby/bin/rails:4:in `<top (required)>' 
    from -e:1:in `load' 
    from -e:1:in `<main>' 

我通過下載的mysql-控制器-C mysql安裝,但它仍然報道了我的錯誤,並且將libmysql.dll複製到ruby/bin,我也將它複製到system32,並且它仍然存在問題,有人可以給我一個建議來解決它。

回答

0

該寶石沒有預置的Ruby-2.0原生擴展(請參閱C:\Ruby\lib\ruby\gems\2.0.0\gems\mysql-2.9.1-x86-mingw32\lib\mysql)。你必須build it yourself或降級到ruby-1.9。

相關問題