我创建了一个新的Rails项目,调用4 o5 m; }4 u: e6 S3 B& F
rails new simple_cms . E2 u- T! I+ ~$ K9 j然后当我在目录中运行) F9 F" E' e. j( D1 _& Q0 A6 j
rails s$ X4 n4 |/ F0 [. N
我收到关注错误 # v1 X* B. M/ X5 ~' w {C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/l ; n( b1 c% z2 Zib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client library version! This" ^2 [% h% E: d$ g- }+ U
gem was compiled for 6.0.0 but the client library is 5.5.24. (RuntimeError)7 X: y( U4 i# M! f$ w1 b+ ]* D
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-1 i9 J" p8 _4 l- j
x86-mingw32/lib/mysql2/mysql2.rb:2:in `'! ~; R6 ~4 ^) c/ E, u3 t8 I
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-' c# Y7 b4 L& H
x86-mingw32/lib/mysql2.rb:9:in `require' 5 R' ?7 z) x4 |$ T0 G from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-$ Z* q- V8 k7 G: E' x/ Q
x86-mingw32/lib/mysql2.rb:9:in `' / J( @$ s6 E/ W. i$ Z2 Q from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/: H& |+ M! f+ E0 I
lib/bundler/runtime.rb:68:in `require') j6 |6 T$ p" T
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/ . C- p) M1 f+ E2 Hlib/bundler/runtime.rb:68:in `block (2 levels) in require' ) }" ^* z: k: m* [! A3 \' D from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/ ! r! Q8 D; C! l" {# Y7 G! slib/bundler/runtime.rb:66:in `each'; K7 x9 y. e9 V- @% a8 \8 _ @
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/& M5 Q1 A- h) `( N |3 d8 A
lib/bundler/runtime.rb:66:in `block in require' 6 m0 w5 W; b K2 [8 y from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/ & [! o4 j( Y4 ^$ f2 U5 glib/bundler/runtime.rb:55:in `each'+ m f- B( p/ j* W- I, j, Z4 }0 p% T
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/ 6 Y& i4 B& n' E) y+ m% j; i; Tlib/bundler/runtime.rb:55:in `require'* J/ V% {+ M" [. P' H
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/) [1 y( u2 { L$ L+ ~
lib/bundler.rb:119:in `require' 1 D. x0 C/ Z6 a from c:/development/ruby/simple_cms/config/application.rb:7:in `'2 v+ K5 ?% W' t( m
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.3# N0 [0 i) H) {. f" n0 l/ ^# @4 T
/lib/rails/commands.rb:53:in `require'+ f: g8 q9 F* C' W
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.36 Z# M1 Y. v* c h- ]2 t7 ~2 K
/lib/rails/commands.rb:53:in `block in '7 l# A9 S: {, {$ A+ Y1 e! o
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.3$ x7 |& x! h7 O. `8 d' E. [
/lib/rails/commands.rb:50:in `tap' - M8 O Y/ S+ B0 o+ U k from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.30 j' } W) x! }$ x6 W
/lib/rails/commands.rb:50:in `' . n9 E7 F3 D$ q+ f from script/rails:6:in `require' 1 J+ ?6 V Q8 K from script/rails:6:in `'7 v& b; w" J X$ O9 D, m& N- t
我见过其他人遇到此错误,但他们通常是linux用户,并且我正在运行Windows。我试图重新安装Rails(railsinstaller.org)和mysql , y3 |* j5 p' G; ?" a5.5。我既使用了32位版本,也使用了64位版本6 g6 C7 S- e5 j) t' ^4 a: Q
; {, B, n+ l( {- N% g 解决方案: * s* m* K0 z3 N9 a# `9 a" i 9 v# K4 A7 C W, j/ [( ~5 P
" s7 F2 _0 L' m' ] ' E! w* C( G) J 这里似乎已经有几个问题。您尝试过他们的解决方案吗? ! A: c5 _4 R$ n5 o1 X相关部分在这里:8 \, F2 g1 `) d4 w
At the time of building this gem, the necessary DLL files where available : F* m! B, x( K: R7 w1 s+ ?in the following download:5 j( g+ z! L% p2 c8 ^( L5 p
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick & ?5 d0 u. m. P5 Y3 t% wAnd put lib\libmysql.dll file in your Ruby bin directory, for example) T, h6 b7 j+ g# L+ R
C:\Ruby\bin