2012-12-10 4 views
0

Ruby on Rails 응용 프로그램을 별도로 개발 된 MySQL 데이터베이스와 연결하려고합니다. 내가 만들려고하면기존 MySQL 데이터베이스를 레일에 연결

adapter: mysql 
username: root 
password: ****** 
host: 127.0.0.1 
port: 3306 

레일에서 MySQL의 연결이 보여줍니다 : 또한

C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.0-x86-mingw32/lib/mysql.rb:4:in `require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.5.9. (RuntimeError) 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.0-x86-mingw32/lib/mysql.rb:4:in `<top (required)>' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:128:in `require' 
    from D:/registration/config/application.rb:7:in `<top (required)>' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:53:in `require' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:53:in `block in <top (required)>' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap' 
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

D:\registration> 

, 내 레이크 명령을 시도 할 때 보여줍니다

이 연결을 위해 나는 development 환경을 사용
rake aborted! 
Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.5.9. 
D:/registration/config/application.rb:7:in `<top (required)>' 
D:/registration/Rakefile:5:in `<top (required)>' 
(See full trace by running task with --trace) 

D:\registration> 

내 데이터베이스에 어떻게 연결할 수 있습니까?

답변

2

오류에 따라 MySQL 클라이언트보다 최신 버전의 보석을 사용하고있는 것처럼 보입니다.

은 말한다 :

  • 당신의 보석 (로 만든) 내 SQL 클라이언트 버전 6.0.0을 컴파일하고있다.
  • 내 컴퓨터의 실제 sql 클라이언트 버전은 5.5.9입니다.

MySQL 클라이언트 버전과 MySQL 보석 버전을 게시 할 수 있습니까?

MySQL 클라이언트를 버전 6.0.0으로 업그레이드하면이 문제가 해결됩니다.

관련 문제