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

后端 未结 5 1910
时光取名叫无心
时光取名叫无心 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条回答
  •  萌比男神i
    2020-12-01 19:51

    Copy paste from that link: https://github.com/brianmario/mysql2/issues/359. It worked for me.


    If after installing the gem, you get an error:

    "The specified module could not be found.
    C:/Devel/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11/lib/mysql2/mysql2.so"

    That can be fixed by copying libmysql.dll to Ruby's bin folder.

提交回复
热议问题