Issues installing on OS X + MacPorts + RVM
Closed this issue · 6 comments
I want to try your gem on OS X, I've already installed the c library using MacPorts, so I have the required files under /opt/local
My first attempt was a simple gem install qrencoder
, it didn't worked
~> gem install qrencoder
[...]
checking for qrencode.h... no
So I added -- --with-opt-dir
to my command, this hasn't worked with the following stacktrace:
~> gem install qrencoder -- --with-opt-dir
Building native extensions. This could take a while...
ERROR: Error installing qrencoder:
ERROR: Failed to build gem native extension.
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-opt-dir
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1336:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1969:in `init_mkmf'
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/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:1:in `<main>'
Gem files will remain installed in /Users/fabio/.rvm/gems/ruby-1.9.2-p180/gems/qrencoder-1.3.4 for inspection.
Results logged to /Users/fabio/.rvm/gems/ruby-1.9.2-p180/gems/qrencoder-1.3.4/ext/qrencoder_ext/gem_make.out
How can I solve?
Thanks.
Fabn,
Can you look at the makefile output at /Users/fabio/.rvm/gems/ruby-1.9.2-p180/gems/qrencoder-1.3.4/ext/qrencoder_ext/gem_make.out and send that along?
Jacob
On Jun 26, 2011, at 8:11 PM, fabn wrote:
I want to try your gem on OS X, I've already installed the c library using MacPorts, so I have the required files under
/opt/local
My first attempt was a simple
gem install qrencoder
, it didn't worked~> gem install qrencoder
[...]
checking for qrencode.h... noSo I added
-- --with-opt-dir
to my command, this hasn't worked with the following stacktrace:~> gem install qrencoder -- --with-opt-dir
Building native extensions. This could take a while...
ERROR: Error installing qrencoder:
ERROR: Failed to build gem native extension./Users/fabio/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-opt-dir
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1336:in
'dir_config': undefined method
split' for true:TrueClass (NoMethodError)
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1969:ininit_mkmf' from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1994:in
<top (required)>'
from internal:lib/rubygems/custom_require:29:inrequire' from <internal:lib/rubygems/custom_require>:29:in
require'
from extconf.rb:1:in `Gem files will remain installed in /Users/fabio/.rvm/gems/ruby-1.9.2-p180/gems/qrencoder-1.3.4 for inspection.
Results logged to /Users/fabio/.rvm/gems/ruby-1.9.2-p180/gems/qrencoder-1.3.4/ext/qrencoder_ext/gem_make.outHow can I solve?
Thanks.
Reply to this email directly or view it on GitHub:
#3
Sure, but it says the same thing
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-opt-dir
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1336:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1969:in `init_mkmf'
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/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:1:in `<main>'
Thanks for your immediate response.
Okay, I shll have to figure out what's going on there when I can, but it might take me a few days... Is that okay?
On Jun 26, 2011, at 8:21 PM, fabn wrote:
Sure, but it says the same thing
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-opt-dir
'
/Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1336:indir_config': undefined method
split' for true:TrueClass (NoMethodError)
from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1969:ininit_mkmf' from /Users/fabio/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:1994:in
<top (required)>'
from internal:lib/rubygems/custom_require:29:inrequire' from <internal:lib/rubygems/custom_require>:29:in
require'
from extconf.rb:1:in `Thanks for your immediate response.
Reply to this email directly or view it on GitHub:
#3 (comment)
Of course, let me know if I can help.
Can you try running this?
gem install qrencoder -- --with-opt-dir /opt/local
I think you're just missing the directory to add to the path.
You're (almost) right!!! The correct command to install was gem install qrencoder -- --with-opt-dir=/opt/local
, you just missed an equal sign, but you found the way. I think you could add this as a note to the readme.
Thanks for your help and for your gem.