2014-02-08 112 views
0

我是一个Windows 8.1用户,拥有64位机器。不过,我已经在32位版本中安装了所有关于Ruby的内容,以防止所有因特网上的着名错误。这并不足以......试图启动,其中提到的MySQL的Rails的WEBBrick服务器时,我还是收到一个奇怪的错误:无法启动WEBRick网络服务器 - Ruby引发MySQL错误

C:\Users\User\Workspace\Ruby\ruby_learn>rails server 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb:8:in `require': 
Incorrect MySQL client library version! This gem was compiled for 6.1.3 but the 
client library is 6.0.0. (RuntimeError) 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb:8:i 
n `<top (required)>' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:76:in `require' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:76:in `block (2 levels) in require' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:72:in `each' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:72:in `block in require' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:61:in `each' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runti 
me.rb:61:in `require' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:13 
1:in `require' 
     from C:/Users/User/Workspace/Ruby/ruby_learn/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:in `require' 
     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:in `tap' 
     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:in `require' 
     from bin/rails:4:in `<main>' 

我确实遇到了一些麻烦,以获得MySQL工作的一天,但我解决它通过做一些东西,我不明白与MySQL C连接器6.0.2,然后提前我无法获得捆绑安装,因为它要求mysql2 0.3.15,但我有mysql2 0.3。 13显然。我不确定它错在哪里。因此,我从dev.mysql.com获得的更新的C Connector修复了捆绑包问题,但现在Web服务器不会运行。

我不知道设置Ruby on Rails可能会很痛苦,但我仍然非常有动力,为了继续,我需要帮助。

谢谢。

+0

您是否尝试过运行'bundle exec rails server'? –

+0

不,我不知道。现在我运行了它,但仍然遇到同样的错误。 :\ – Aborted

+0

加入Gemfile'gem'mysql2'' – itsnikolay

回答