Installing mysql-2.9.0 gem on Windows fails due to lack of libmysql

前端 未结 2 1680
独厮守ぢ
独厮守ぢ 2021-01-14 12:03

I\'m trying to install Redmine 2.1.4 on Windows Server 2003. For it to work, I need to install activerecord-mysql-adapter gem, which in turn seems to rely on

相关标签:
2条回答
  • 2021-01-14 12:20

    Try with no installer version of connector from http://dev.mysql.com/downloads/connector/c/ and extract the content in root folder or a folder path which does not have any space for and then try to install mysql gem

    example

    gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql-connector-c-noinstall-6.0.2-win32
    
    0 讨论(0)
  • 2021-01-14 12:37

    I've released mysql gem version 2.9.0 with both ruby and x86-mingw32 pre-compiled binaries.

    If you let RubyGems determine the right platform, it will automatically install x86-mingw32 platform gem for you, which will avoid the compilation process.

    Once installed, it will show you a set of instructions indicating you to download MySQL Connector/C and placing it's DLLs in the right place:

    C:\Users\Luis>gem install mysql
    Fetching: mysql-2.9.0-x86-mingw32.gem (100%)
    
    ======================================================================================================
    
      You've installed the binary version of mysql.
      It was built using MySQL Connector/C version 6.0.2.
      It's recommended to use the exact same version to avoid potential issues.
    
      At the time of building this gem, the necessary DLL files where available
      in the following URL:
    
      http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick
    
      You can put the lib\libmysql.dll available in this package to your Ruby bin directory.
      E.g. C:\Ruby\bin
    
    ======================================================================================================
    
    Successfully installed mysql-2.9.0-x86-mingw32
    1 gem installed
    

    There is no need to download or install MySQL if you only need to connect to an already running version of MySQL.

    Both RubyGems and Bundler will automatically detect the right platform and install the right pre-compiled binaries without the need to compile them on your own.

    If you're behind a proxy, use --http-proxy parameter of gem install (see help) or set HTTP_PROXY environment variable.

    Hope that helps.

    0 讨论(0)
提交回复
热议问题