0

After upgrading from 14.10 to 15.04 when i start rails server it gives this error:

arslion@arslion-Lenovo-B570e:~$ rails s 
/home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/mysql2-0.3.18/lib/mysql2.rb:31:in `require': Incorrect MySQL client library version! This gem was compiled for 5.5.43 but the client library is 5.6.24. (RuntimeError)
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/mysql2-0.3.18/lib/mysql2.rb:31:in `<top (required)>'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
    from /home/arslion/config/application.rb:14:in `<top (required)>'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/arslion/bin/rails:8:in `require'
    from /home/arslion/bin/rails:8:in `<top (required)>'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
    from /home/arslion/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/arslion/bin/spring:16:in `require'
    from /home/arslion/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'
0

Uninstalling and reinstalling the gem often solves the problem .That solution worked for me .

  1. gem uninstall mysql2 and then
  2. bundle install

Hope that works .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.