简体   繁体   English

Redmine安装:Mysql gem说未定义符号:mysql_init

[英]Redmine installation: Mysql gem say undefined symbol: mysql_init

I'm trying to install redmine on a OVH mutualized server but i'm block by a MySQL gem issue. 我正在尝试在OVH互助服务器上安装redmine,但是我被MySQL gem问题所阻止。 OVH servers does not allow external network connection. OVH服务器不允许外部网络连接。 I've downloaded and installed manually all gems with dependencies required for Redmine. 我已经下载并手动安装了Redmine所需的所有依赖项的gem。

I've installed without any problems MySQL gems: - mysql 2.8.1 - mysql2 0.3.11 我已经安装了没有问题的MySQL gem:-mysql 2.8.1-mysql2 0.3.11

For the installation I needed to specify mysql lib and include folders path because it's a mutualized installation and a non standard layout: 对于安装,我需要指定mysql lib并包含文件夹路径,因为它是相互安装的并且是非标准布局:

gem install mysql-2.8.1.gem
    --no-rdoc
    --no-ri
    --
    --with-mysql-config=/usr/bin/mysql_config
    --without-mysql-dir
    --with-mysql-lib=/usr/lib/mysql
    --with-mysql-include=/usr/include/mysql

gem install mysql2-0.3.11.gem
    --no-rdoc
    --no-ri
    --
    --with-mysql-config=/usr/bin/mysql_config
    --without-mysql-dir
    --with-opt-lib=/usr/lib/mysql
    --with-opt-include=/usr/include/mysql

With these 2 commands, I get no error and a message 1 gem insalled . 使用这2条命令,我没有出现任何错误,并且消息1 gem insalled

After that funny manual package installation process, I've followed the Redmine installation tutorial to initialize my environment. 在完成了有趣的手动软件包安装过程之后,我遵循了Redmine安装教程来初始化我的环境。

First command, generate secret token: rake generate_secret_token Second command, build database schema: RAILS_ENV=production rake db:migrate 第一条命令,生成秘密令牌: rake generate_secret_token第二条命令,构建数据库架构: RAILS_ENV=production rake db:migrate

The first one work perfectly, but the second send me this error: 第一个工作正常,但是第二个向我发送此错误:

ruby: symbol lookup error: /MYHOMEFOLDER/gems/mysql-2.8.1/lib/mysql_api.so: undefined symbol: mysql_init

Is there someone who knows how I can resolve this problem? 有谁知道我该如何解决这个问题?

If you're using ruby1.9 then use the mysql2 gem. 如果您使用的是ruby1.9使用mysql2 gem。
If you're using ruby1.8 then use the mysql gem. 如果您使用的是ruby1.8使用mysql gem。

So, if you're using 1.9, in your config/database.yml 因此,如果您使用的是1.9,请在config/database.yml

production:
  adapter: mysql2

and : 和:

gem install mysql2

If you're running Redmine >1.4, use Bundler instead of gem install ... ! 如果您正在运行Redmine> 1.4,请使用Bundler代替gem install ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM