RuntimeError with mysql2 and rails3 (bundler)

前端 未结 11 2117
花落未央
花落未央 2020-12-12 20:08

I get this error

`establish_connection\': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record         


        
11条回答
  •  暖寄归人
    2020-12-12 20:48

    I'm a beginner at ruby, rails, and linux. So if this solution did not work, I hold no responsibility :)

    Step 1:

    sudo gem uninstall mysql2
    

    Step 2:

    sudo gem install mysql -v 0.2.7
    

    Start webrick, if the same problem still appears reinstall rails.

    This solution works for me.

提交回复
热议问题