How to fix 'rails server' problem when I set "gem 'mysql'" in gemfile


#1

I install mysql in rails , but when submit “rails server” ,it is appear
this problem and the server did not turn on

C:\rubydev\hello>rails server
C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:6:in
r equire': cannot load such file -- mysql/mysql_api (LoadError) from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mys ql.rb:6:inrescue in <top (required)>’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mys
ql.rb:2:in <top (required)>' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti me.rb:72:inrequire’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti
me.rb:72:in block (2 levels) in require' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti me.rb:70:ineach’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti
me.rb:70:in block in require' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti me.rb:59:ineach’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runti
me.rb:59:in require' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:13 2:inrequire’
from C:/rubydev/hello/config/application.rb:7:in <top (required)>' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman ds.rb:76:inrequire’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:76:in block in <top (required)>' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman ds.rb:73:intap’
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:73:in <top (required)>' from bin/rails:4:inrequire’
from bin/rails:4:in `’


#2

Try this:

http://stackoverflow.com/questions/16507408/windows-rails-server-error-mysql-bundler-railties

Daniel

Dne pondl, 14. jna 2013 17:58:57 UTC+2 Clarkz napsal(a):