Error “…cannot load such file — mysql2/2.0/mysql2 (LoadError)”. On Windows XP with Ruby 2.0.0

后端 未结 5 1922
时光取名叫无心
时光取名叫无心 2020-12-01 18:54

The command rails server throws this error.

C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require\':          


        
5条回答
  •  半阙折子戏
    2020-12-01 19:32

    uninstall mysql2-0.3.11-x86-mingw32, gems compiled before Ruby200 won't work. You have to compile it yourself. If you run gem uninstall mysql2 and there is a non compiled version listed then just uninstall mysql2-0.3.11-x86-mingw32 - the compiled version else...

    Installation gem install mysql2 --platform=ruby. that would work.

    Follow this guide on installing devkit http://rubyonwindowsguides.github.com/book/ch02-04.html.

    Then try again.

提交回复
热议问题