gem install mysql – --with-mysql-config=/usr/bin/mysql_config
No problems at all, but my logfile still shows:
WARNING: You’re using the Ruby-based MySQL library that ships with
Rails. This library is not suited for production. Please install the C-
based MySQL library instead (gem install mysql).
WARNING: You’re using the Ruby-based MySQL library that ships with
Rails. This library is not suited for production. Please install the
C-
based MySQL library instead (gem install mysql).
WARNING: You’re using the Ruby-based MySQL library that ships with
Rails. This library is not suited for production. Please install the
C-
based MySQL library instead (gem install mysql).
What’s wrong here?
Stick a breakpoint in rails/activerecord/lib/active_record/
connection_adapters/mysql_adapater.rb
It falls back to ruby mysql if it an exception is raised while
requiring the gem, which usually means the gem isn’t there. If you can
peak at the exception in the debugger (or comment out the rescue so
that it bubbles to the surface) then it might shed a little more light
on the issue
WARNING: You�re using the Ruby-based MySQL library that ships with
Rails. This library is not suited for production. Please install the
C-
based MySQL library instead (gem install mysql).
If you open up irb and do
require ‘rubygems’
require ‘mysql’
What happens ?
Fred
What would you have said if it failed to load?
% irb
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘mysql’
LoadError: Failed to load
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
from
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require’
from (irb):2