mysql2

mysql2 gem compiled for wrong mysql client library

你。 提交于 2019-11-26 11:42:34
When try to connect to the mysql server through my rails application, I get the following error D:/Program_Files/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.0.27. (RuntimeError) How can I rectify it? antinome I had the same problem as you, or at least the symptom was the same. Background: I was using Rails 3, the mysql2 gem, and MySQL community server version 5.5.21 (32-bit) installed locally on my Windows machine. I grabbed the client library ( libmysql.dll )

Ruby gem mysql2 install failing

扶醉桌前 提交于 2019-11-26 06:16:10
问题 When I try to install the mysql2 gem, it fails with no apparent errors. Does anyone know what to do to work around this so mysql2 installs? $ sudo gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for rb_thread_blocking_region()... no checking for mysql_query() in -lmysqlclient... no checking for main() in

rails server fails to start with mysql2 using rvm & ruby 1.9.2-p0 on OSX 10.6.5

旧时模样 提交于 2019-11-26 04:40:31
问题 I\'m getting the following error when I start rails server: $ rails server /Users/ssmith/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.6/lib/mysql2.rb:7:in `require\': dlopen(/Users/ssmith/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Referenced from: /Users/ssmith/.rvm/gems/ruby-1.9.2-p0/gems/mysql2- 0.2.6/lib/mysql2/mysql2.bundle Reason: image not found - /Users/ssmith/.rvm/gems/ruby-1.9.2-p0/gems/mysql2- 0.2.6/lib

mysql2 gem compiled for wrong mysql client library

我的未来我决定 提交于 2019-11-26 02:30:59
问题 When try to connect to the mysql server through my rails application, I get the following error D:/Program_Files/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require\': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.0.27. (RuntimeError) How can I rectify it? 回答1: I had the same problem as you, or at least the symptom was the same. Background: I was using Rails 3, the mysql2 gem, and MySQL community server version 5.5