production mode and mysql library question

I just put one application in production mode to see if everything works fine.

I runs on a Debian/Etch machine:

gems:

actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2)
cgi_multipart_eof_fix (2.5.0)
fastthread (1.0.1)
mongrel (1.1.2)
mongrel_cluster (1.0.5)
mysql (2.7)
...

libs:

ibdpkg-ruby1.8 install
libgems-ruby1.8 install
libhttp-access2-ruby1.8 install
libintl-gettext-ruby1.8 install
libmysql-ruby install
libmysql-ruby1.8 install
libopenssl-ruby install
libopenssl-ruby1.8 install
libreadline-ruby1.8 install
libruby1.8 install
libsqlite3-ruby1.8 install
libxml-parser-ruby1.8 install
ruby install
ruby1.8 install
ruby1.8-dev install
rubygems install
libdbd-mysql-perl install
libmysql-ruby install
libmysql-ruby1.8 install
libmysqlclient15-dev install
libmysqlclient15off install
mysql-client-5.0 install
mysql-common install
mysql-server install
mysql-server-5.0 install

...

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).

What's wrong here?

Thanx

I just put one application in production mode to see if everything
works fine.

I runs on a Debian/Etch machine:

gems:

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).

If you open up irb and do

require 'rubygems'
require 'mysql'

What happens ?

Fred

root@pitbull:/tmp# irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'mysql'
=> true
irb(main):003:0>

I notice you're running as root - does it still work not as root (perhaps the gem somehow got installed in a way non root users can't get at ?)

Fred

root@pitbull:~# sudo su gissmoh
gissmoh@pitbull:/root$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'mysql'
=> true
irb(main):003:0>

nobody else with this problem?

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

Fred

Frederick Cheung wrote:

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).

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

My system:
Os X 10.4.11
PPC

ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.11.0]
gem 1.0.1
Rails 2.0.2
mysql-5.0.51a-osx10.4-powerpc-64bit

% gem list

*** LOCAL GEMS ***
...
mysql (2.7)
...