参考了https://github.com/brianmario/mysql2mysql2,单独使用 这个 gem,新建一文件 app.rb,里面单独写 require 'mysql2' 执行后,报 mysql2.bundle: [BUG] Segmentation fault 错误
ruby 版本 1.9.3,Google 了一会,有说换 mysql 版本的,不太现实吧,求解。
部分错误信息
-- Ruby level backtrace information ----------------------------------------
./app.rb:1:in `<main>'
/Users/wiki/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/wiki/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
/Users/wiki/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
/Users/wiki/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>'
/Users/wiki/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/wiki/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'