我有一个干净的构建系统,如下所示:
Ubuntu 11.04
Rvm 1.13.5
Ruby 1.9.3p194
Rails 3.2.3
Gem 1.8.24
MySql 5.5.24-1(安装在 /usr/local)
我正在尝试安装 mysql2 gem(0.3.11),但遇到以下问题:
第一个问题:有人在Ubuntu上使用MySql 5.5.1成功运行Rails mysql2吗?我已经在另一个系统上使用了5.1。gem的说明模糊地提到了支持的MySql版本。
第二个问题:有人遇到过这个问题吗?我在过去一年左右与mysql2 gem的各种库问题作斗争,但这似乎是不同的问题。
非常感谢您的帮助。
顺便说一下:退回到MySql 5.1是有效的解决方案!
敬礼
彼得
Ubuntu 11.04
Rvm 1.13.5
Ruby 1.9.3p194
Rails 3.2.3
Gem 1.8.24
MySql 5.5.24-1(安装在 /usr/local)
我正在尝试安装 mysql2 gem(0.3.11),但遇到以下问题:
pal@smurf01:~$ sudo gem install mysql2
[sudo] password for pal:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make
compiling client.c
client.c: In function 'rb_raise_mysql2_error':
client.c:98:3: warning: ISO C90 forbids mixed declarations and code
client.c: In function 'rb_mysql_client_socket':
client.c:590:3: warning: ISO C90 forbids mixed declarations and code
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.so
/usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient_r.so when searching for -lmysqlclient_r
/usr/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient_r.a when searching for -lmysqlclient_r
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [mysql2.so] Error 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
pal@smurf01:~$
第一个问题:有人在Ubuntu上使用MySql 5.5.1成功运行Rails mysql2吗?我已经在另一个系统上使用了5.1。gem的说明模糊地提到了支持的MySql版本。
第二个问题:有人遇到过这个问题吗?我在过去一年左右与mysql2 gem的各种库问题作斗争,但这似乎是不同的问题。
非常感谢您的帮助。
顺便说一下:退回到MySql 5.1是有效的解决方案!
敬礼
彼得