R
Richard Navarrete
Howdy,
I've successfully installed ruby-rails-mysql on my powerbook, on our
Windows server, but am missing something on our Linux box.
Ruby is installed (1.8.4), so is rails (0.8.11). And I got the
"Congratulations, you put Ruby on Rails!" screen. I have MySQL
already installed (it's been there for a long time), version 4.0.25).
Now, I need to install the driver for MySQL/Ruby (mysql-ruby-2.7).
Here's how the progression goes:
<code>
[richard@www mysql-ruby-2.7]$ ruby ./extconf.rb --with-mysql-dir=/usr
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile
[richard@www mysql-ruby-2.7]$ make
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/
local/lib/ruby/1.8/i686-linux -I. -DHAVE_MYSQL_SSL_SET -
DHAVE_MYSQL_MYSQL_H -I/usr/include -c mysql.c
gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/
usr/local/lib' -o mysql.so mysql.o -lmysqlclient -ldl -lcrypt -lm
-lc
[richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root
<myrootpass> test
/test.rb:143: undefined method `client_version' for Mysql:Class
(NoMethodError)
</code>
BTW, I created an empty database called `test`.
Anyone had a similar experience? Any ideas?
Cheers,
Richard
I've successfully installed ruby-rails-mysql on my powerbook, on our
Windows server, but am missing something on our Linux box.
Ruby is installed (1.8.4), so is rails (0.8.11). And I got the
"Congratulations, you put Ruby on Rails!" screen. I have MySQL
already installed (it's been there for a long time), version 4.0.25).
Now, I need to install the driver for MySQL/Ruby (mysql-ruby-2.7).
Here's how the progression goes:
<code>
[richard@www mysql-ruby-2.7]$ ruby ./extconf.rb --with-mysql-dir=/usr
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile
[richard@www mysql-ruby-2.7]$ make
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/
local/lib/ruby/1.8/i686-linux -I. -DHAVE_MYSQL_SSL_SET -
DHAVE_MYSQL_MYSQL_H -I/usr/include -c mysql.c
gcc -shared -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/
usr/local/lib' -o mysql.so mysql.o -lmysqlclient -ldl -lcrypt -lm
-lc
[richard@www mysql-ruby-2.7]$ ruby ./test.rb localhost root
<myrootpass> test
/test.rb:143: undefined method `client_version' for Mysql:Class
(NoMethodError)
</code>
BTW, I created an empty database called `test`.
Anyone had a similar experience? Any ideas?
Cheers,
Richard