ruby-on-rails - bundle 安装错误 - "mysql2"

标签 ruby-on-rails ruby macos

当我运行“bundle install”时,出现以下错误:

An error occurred while installing mysql2 (0.3.17), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.17'` succeeds before bundling.

当我尝试运行命令 gem install mysql2 -v '0.3.17' 时我收到错误:

ERROR:  Error installing mysql2:
ERROR: Failed to build gem native extension.

Complete log

我尝试过重新安装和安装 rails 。

我使用的是 MacO。

有人吗?谢谢!

最佳答案

如果您使用自制程序:

brew install mysql

然后

gem install mysql2 -v '0.3.17'

关于ruby-on-rails - bundle 安装错误 - "mysql2",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27068484/

相关文章:

ruby-on-rails - 为什么Refinery CMS创建记录后没有图像?

ruby-on-rails - 在 ruby​​ on rails 中导出 Excel

ruby-on-rails - 有多少人将 Rspec 用于 Controller 和 View ?

python - 从命令行运行已安装的 python 包

swift - 以编程方式更改 Mac 光标速度

ruby-on-rails - 如何模拟外部API?

ruby - 要求不在规范内工作

ruby-on-rails - 如何显示 future 预订的产品?

ruby-on-rails - Ruby 和编码转换

c++ - gethostbyaddr() 函数是否使用互联网将 IP 地址转换为主机名?