2012-03-09 6 views
1

CentOSでRails 3.2を正常に実行できる人はいますか?ここでは、見ている問題です:CentOSのRails 3 - mysql2 gemの問題?

[[email protected] current]# rails c 
/var/www/html/webapps/intl-custserv/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': Incorrect MySQL client library version! This gem was compiled for 5.5.15 but the client library is 5.0.92. (RuntimeError) 
    from /var/www/html/webapps/intl-custserv/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>' 


は、そしてここに私たちの環境についてのいくつかの詳細な情報です:いくつかは、(多分)、関連するファイルが存在するのはここ

[[email protected] ~]# cat /etc/redhat-release 
CentOS release 5.7 (Final) 
[[email protected] ~]# mysql --version 
mysql Ver 14.14 Distrib 5.5.13, for Linux (x86_64) using readline 5.1 
[[email protected] ~]# rvm list 

rvm rubies 

    jruby-1.6.7 [ amd64 ] 
    ruby-1.8.7-p358 [ x86_64 ] 
=* ruby-1.9.3-p125 [ x86_64 ] 

# => - current 
# =* - current && default 
# * - default 

[[email protected] ~]# gem list --local 

*** LOCAL GEMS *** 

actionmailer (3.2.2) 
actionpack (3.2.2) 
activemodel (3.2.2) 
activerecord (3.2.2) 
activeresource (3.2.2) 
activesupport (3.2.2) 
arel (3.0.2) 
builder (3.0.0) 
bundler (1.1.0, 1.0.22) 
coffee-rails (3.2.2) 
coffee-script (2.2.0) 
coffee-script-source (1.2.0) 
daemon_controller (1.0.0) 
erubis (2.7.0) 
execjs (1.3.0) 
fastthread (1.0.7) 
hike (1.2.1) 
i18n (0.6.0) 
journey (1.0.3) 
jquery-rails (2.0.1) 
json (1.6.5) 
mail (2.4.3) 
mime-types (1.17.2) 
multi_json (1.1.0) 
mysql2 (0.3.11) 
passenger (3.0.11) 
polyglot (0.3.3) 
rack (1.4.1) 
rack-cache (1.2) 
rack-ssl (1.3.2) 
rack-test (0.6.1) 
rails (3.2.2) 
railties (3.2.2) 
rake (0.9.2.2, 0.9.2) 
rdoc (3.12) 
sass (3.1.15) 
sass-rails (3.2.4) 
sprockets (2.1.2) 
thor (0.14.6) 
tilt (1.3.3) 
treetop (1.4.10) 
tzinfo (0.3.32) 
uglifier (1.2.3) 
[[email protected] ~]# 


もあります:

[[email protected] ~]# whereis mysql_config 
mysql_config: /usr/bin/mysql_config /usr/share/man/man1/mysql_config.1.gz 
[[email protected] ~]# ls -al /usr/lib64/mysql 
total 14988 
drwxr-xr-x 3 root root  4096 Mar 7 22:59 . 
drwxr-xr-x 44 root root 24576 Mar 7 23:15 .. 
-rw-r--r-- 1 root root 120260 May 11 2011 libmygcc.a 
-rw-r--r-- 1 root root 15148296 May 11 2011 libmysqlclient.a 
lrwxrwxrwx 1 root root  16 Mar 7 22:59 libmysqlclient_r.a -> libmysqlclient.a 
-rw-r--r-- 1 root root 10000 May 11 2011 libmysqlservices.a 
drwxr-xr-x 3 root root  4096 Mar 7 22:20 plugin 
[[email protected] ~]# 


洞察力があれば幸いです!

おかげ

+0

2つのバージョンのmySQLがインストールされていますか? –

+0

それは良い考えです!私は私たちがやっているとは思わない。 mysql /usr/bin/mysql [root @ scglobal-web01〜]# ' – papaganouche

+0

' ''は ''あなたが見つけた最初のビンを表示するだけです。あなたはもっと掘りなさい。 –

答えて

0

私はまったく同じ問題を抱えています。

上で実行されている:

  • のCentOS 6.3(最終)
  • mysqlの按分5.5.28 14.14 Verは、Linuxの(x86_64版)のためのreadline 5.1
  • RVMとルビーを使用してリリース1.9.3

これまでのところ、mysql-develパッケージは5.5ではなくmysql 5.0.x用です

私は新しいパッケージでgemを再インストールしてください。しかし、私は、これまで

兆しが

$ sudo yum install mysql-devel 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: centos.mirror.linuxwerk.com 
* epel: mirrors.n-ix.net 
* extras: mirror.jgotteswinter.com 
* updates: mirror.optimate-server.de 
Setting up Install Process 
Resolving Dependencies 
--> Running transaction check 
---> Package mysql-devel.x86_64 0:**5.1.69**-1.el6_4 will be installed 

をしているし、我々は取得した後、それがインストールされていることを行うことができません。バンドルインストールは0.3.13をうまくインストールします。

$rails c 
...../gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require': Incorrect MySQL client library version! This gem was compiled for 5.1.69 but the client library is 5.5.28. (RuntimeError) 
関連する問題