Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > `dir_config': undefined method `split'

Reply
Thread Tools

`dir_config': undefined method `split'

 
 
Rick Tan
Guest
Posts: n/a
 
      03-04-2011
Having difficulty installing 'gem install mysql2'. Getting these

gem install mysql2 --
--with-mysql-config=/opt/mysql/mysql/bin/mysql_config --with-opt-include
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
--with-mysql-config=/opt/mysql/mysql/bin/mysql_config --with-opt-include
/usr/local/lib/ruby/1.9.1/mkmf.rb:1345:in `dir_config': undefined method
`split' for true:TrueClass (NoMethodError)
from /usr/local/lib/ruby/1.9.1/mkmf.rb:1969:in `init_mkmf'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:1994:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from extconf.rb:2:in `<main>'


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

Does anybody know what i am missing?

Thanks.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Daniel Berger
Guest
Posts: n/a
 
      03-04-2011


On Mar 4, 1:41=A0pm, Rick Tan <(E-Mail Removed)> wrote:
> Having difficulty installing 'gem install mysql2'. =A0Getting these
>
> gem install mysql2 --
> --with-mysql-config=3D/opt/mysql/mysql/bin/mysql_config --with-opt-includ=

e
> Building native extensions. =A0This could take a while...
> ERROR: =A0Error installing mysql2:
> =A0 =A0 =A0 =A0 ERROR: Failed to build gem native extension.
>
> =A0 =A0 =A0 =A0 /usr/local/bin/ruby extconf.rb
> --with-mysql-config=3D/opt/mysql/mysql/bin/mysql_config --with-opt-includ=

e
> /usr/local/lib/ruby/1.9.1/mkmf.rb:1345:in `dir_config': undefined method
> `split' for true:TrueClass (NoMethodError)
> =A0 =A0 =A0 =A0 from /usr/local/lib/ruby/1.9.1/mkmf.rb:1969:in `init_mkmf=

'
> =A0 =A0 =A0 =A0 from /usr/local/lib/ruby/1.9.1/mkmf.rb:1994:in `<top
> (required)>'
> =A0 =A0 =A0 =A0 from <internal:lib/rubygems/custom_require>:29:in `requir=

e'
> =A0 =A0 =A0 =A0 from <internal:lib/rubygems/custom_require>:29:in `requir=

e'
> =A0 =A0 =A0 =A0 from extconf.rb:2:in `<main>'
>
> Gem files will remain installed in
> /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6 for inspection.
> Results logged to
> /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/ext/mysql2/gem_make.out
>
> Does anybody know what i am missing?


I think this is happening because you didn't specify a path for --with-
opt-include. Arguably this is a bug in mkmf. Line 1345 is this:

idirs =3D idir ? Array =3D=3D=3D idir ? idir.dup :
idir.split(File:ATH_SEPARATOR) : []

idir is set by the with_config method, which can return a value, true
or false. The dir_config method will choke on true or false, though.

Anyway, try dropping the "--with-opt-include" option or specify the
path and see if that helps.

Regards,

Dan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefine Method Only Marks the Method Undefined Su Zhang Ruby 3 04-18-2011 12:11 AM
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
typeof x == 'undefined' or x == undefined? -Lost Javascript 13 01-31-2007 12:04 AM
undefined vs. undefined (was: new Array() vs []) VK Javascript 45 09-12-2006 05:26 PM
undefined behavior or not undefined behavior? That is the question Mantorok Redgormor C Programming 70 02-17-2004 02:46 PM



Advertisments