#1 楼 @huhongda 谢谢你,我找到我想要的方法了
$ bundle config build.mysql2 --with-mysql-include=/usr/local/mariadb/include/mysql/ --with-mysql-lib=/usr/local/mariadb/lib/ --with-mysql-dir=/usr/local/mariadb/ $ bundle install