0

I can't launch server on rails.
I uninstalled and re-installed both mysql and mysql gem.
But still I get the same error

This is what i get

C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.0/mysql2 (LoadError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from G:/Surath/Sites/simple_cms2/config/application.rb:7:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
John
  • 1
  • How did you install the MySQL gem? – the Tin Man May 11 '13 at 19:29
  • Do you have "gem 'mysql'" in the Gemfile? Is this the error that you get when you run "rails s"? – JEMaddux May 11 '13 at 20:06
  • Yes. this is the error I get when I run "rails s". And I think I've got myslq gem, because when I check the gem list I get "Using mysql2 (0.3.11)" in the list. – John May 11 '13 at 20:18
  • can you run mysql from the command line? it could be an error with your PATH. Additionally, make sure you have the mysql-devel package installed. with out it the gem may not build/work correctly. – Ben Miller May 12 '13 at 05:33
  • @Ben Yes, mysql works in command line. I'm not sure about the "mysql-devel package" how can I check it. – John May 12 '13 at 06:18
  • when I installed the msql gem I got - You've installed the binary version of mysql2. It was built using MySQL Connector/C version 6.0.2. It's recommended to use the exact same version to avoid potential issues. At the time of building this gem, the necessary DLL files where available in the following download: http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\bin" I did it still doesn't work. – John May 12 '13 at 06:19
  • Is there any way that I can install any other version of mysql gem than the binary version. – John May 12 '13 at 06:20
  • how does your database.yml look like? – Matthias May 13 '13 at 06:00

0 Answers0