【问题标题】:Mysql2 error during upgrade from Ruby 1.9.3 to 2.0.0从 Ruby 1.9.3 升级到 2.0.0 期间出现 Mysql2 错误
【发布时间】:2013-04-23 17:40:45
【问题描述】:

我有一个我们在工作中使用的命令行应用程序,它使用 ActiveRecord(不是所有的 rails)。我们希望升级到 Ruby 2.0.0 以提高加载时间性能。

为此,我...

  1. 已下载/安装 ActiveRecord 3.2.13
  2. 下载 Ruby 2.0.0 并在脚本上适当更改 she-bang。

当我运行它时,我得到...

gems/mysql2-0.3.11/lib/mysql2/client.rb:34:in `ssl_set': no implicit conversion of nil into String (TypeError)

我是否错过了一个必要的步骤?

谢谢。

【问题讨论】:

    标签: ssl typeerror mysql2 ruby-2.0


    【解决方案1】:

    我不得不使用 Ruby 2.0.0 附带的 RubyGems 在我的系统上重新安装 mysql2 gem。

    gem uninstall mysql2
    /path/to/ruby-2.0.0-p0/bin/gem install mysql2 -- --with-mysql-config=/path/to/pkgs/mysql/5.1.46-64/bin/mysql_config
    

    Mysql2 之前安装的是旧版本的 Ruby/RubyGems。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-28
      相关资源
      最近更新 更多