Ruby mysql2 Error

前端 未结 2 688
太阳男子
太阳男子 2020-12-10 09:42

I am getting the following error

C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require\': 126: The specified module could not be foun         


        
相关标签:
2条回答
  • 2020-12-10 09:58

    I guess you are running ROR on windows. So follow these steps.

    1. make sure you installed mysql correctlt.
    2. copy libmysql.dll(from mysql installation directory) file into you C:/Ruby193/bin folder
    3. now remove older mysql installed gems.
    4. reinstall mysql gem.

    This might fix your problem.

    0 讨论(0)
  • 2020-12-10 10:15

    If you're using RVM, are you using a specific gemset?

    I've had similar issues and setting specifying a specific gemset has fixed my issues. For example, I'll installed a gem, but then won't be able to load it with a require 'example_gem_name' call. This fixed my issues,

    rvm gemset use gemset_name  
    gem install mysql2  
    gem list mysql2  
    

    Also, to set the RVM default gemset (so you don't have to every time),

    rvm use 1.9.3@gemset_name --default
    
    0 讨论(0)
提交回复
热议问题