gpt4 book ai didi

mysql - 无法启动 WEBRick Web 服务器 - Ruby 抛出 MySQL 错误

转载 作者:太空宇宙 更新时间:2023-11-03 12:17:09 25 4
gpt4 key购买 nike

我是使用 64 位计算机的 Windows 8.1 用户。但是,我已经在 32 位版本中安装了与 Ruby 有关的所有内容,以防止互联网上出现那些著名的错误。这还不够……我在尝试启动 Rails 的提到 MySQL 的 WEBBrick 服务器时仍然收到一个奇怪的错误:

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 连接器解决了捆绑问题,但现在 Web 服务器无法运行。

我不知道设置 Ruby on Rails 会如此痛苦,但我仍然对此充满动力,我需要帮助才能继续。

谢谢。

最佳答案

尝试看看这个答案是否对您有帮助mysql2 gem compiled for wrong mysql client library :

There's a helpful message that is shown when you gem install mysql2. Unfortunately, if you install the gem with Bundler, Bundler eats the message

关于mysql - 无法启动 WEBRick Web 服务器 - Ruby 抛出 MySQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21644356/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com