Got "undefined method `split'" when installing gem dm-mysql-adapter

D

Deche Pangestu

Hello all,

I'm trying to install the gem dm-mysql-adapter with the following
command:

gem install dm-mysql-adapter -- --with-mysql-config=/usr/bin/mysql
--with-mysql-lib=/usr/lib/mysql

and got this result:

Building native extensions. This could take a while...
ERROR: Error installing dm-mysql-adapter:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb --with-mysql-config=/usr/bin/mysql
--with-mysql-lib=/usr/lib/mysql
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
extconf.rb:43:in `<main>': undefined method `split' for nil:NilClass
(NoMethodError)


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.2/ext/do_mysql/gem_make.out


Has anyone experience the same problem? What should I do to fix this?
Thanks!
 
R

Rajinder Yadav

Hello all,

I'm trying to install the gem dm-mysql-adapter with the following
command:

gem install dm-mysql-adapter -- --with-mysql-config=/usr/bin/mysql
--with-mysql-lib=/usr/lib/mysql

and got this result:

Building native extensions. This could take a while...
ERROR: Error installing dm-mysql-adapter:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb --with-mysql-config=/usr/bin/mysql
--with-mysql-lib=/usr/lib/mysql
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
extconf.rb:43:in `<main>': undefined method `split' for nil:NilClass
(NoMethodError)


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.2/ext/do_mysql/gem_make.out


Has anyone experience the same problem? What should I do to fix this?
Thanks!

just a thought, should you not be using --with-opt in place of
--with-mysql ? also you might want to point to location of header file


--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1
 
L

Luis Lavena

Hello all,

I'm trying to install the gem dm-mysql-adapter with the following
command:

gem install dm-mysql-adapter -- --with-mysql-config=/usr/bin/mysql
--with-mysql-lib=/usr/lib/mysql

--with-mysql-config is expecting mysql_config or mysql5_config script,
not mysql binary.

If you provide a mysql_config script, there is no need for --with-
mysql-lib or --with-mysql-include.
Has anyone experience the same problem? What should I do to fix this?
Thanks!

Either provide --with-mysql-config or combine --with-mysql-lib & --
with-mysql-include
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top