0

When I run which ruby in my command line, it returns /Applications/MAMP/Library/bin//ruby.

It seems like this is wrong on two fronts - should my Ruby installation be inside a MAMP folder? If so, how do I move it please?

If it's ok to live there, how can I fix the double // problem? I have tried looking at the file directory in Finder, but it doesn't show paths, and I don't know how to/if it's possible to fix it on the command line.

The reason for this investigation was because I was trying to run bundle install inside a Rails app, and kept getting this failure -

An error occurred while installing inconv (1.0.4) and Bundler cannot continue. Make sure that gem install iconv -v '1.0.4' succeeds before bundling.

When I try and manually install that gem, it fails. With the following error message -

gem install iconv -v '1.0.4'                                             
Building native extensions.  This could take a while...
ERROR:  Error installing iconv:
    ERROR: Failed to build gem native extension.

    current directory: /Applications/MAMP/Library/lib/ruby/gems/2.3.0/gems/iconv-1.0.4/ext/iconv
/Applications/MAMP/Library/bin/ruby -r ./siteconf20170605-25107-o5fym5.rb extconf.rb
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... no
*** 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=/Applications/MAMP/Library/bin/$(RUBY_BASE_NAME)
    --with-iconv-dir
    --without-iconv-dir
    --with-iconv-include
    --without-iconv-include=${iconv-dir}/include
    --with-iconv-lib
    --without-iconv-lib=${iconv-dir}/lib
    --enable-config-charset
    --disable-config-charset
    --with-config-charset
    --without-config-charset
    --with-iconvlib
    --without-iconvlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Applications/MAMP/Library/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-13/2.3.0-static/iconv-1.0.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Applications/MAMP/Library/lib/ruby/gems/2.3.0/gems/iconv-1.0.4 for inspection.
Results logged to /Applications/MAMP/Library/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-13/2.3.0-static/iconv-1.0.4/gem_make.out

Every fix I've found online to try and resolve the Bundler issue also doesn't work - so I am left wondering if the reason it is failing is because of the Ruby location issue?

Thank you in advance for any help! And sorry if I've worded things badly or missed anything important out - I'm really new to coding, so still feeling my way around everything!

Charlie Allen
  • 65
  • 1
  • 5

0 Answers0