4

While trying to do "bundle install", I receive error message below

environment = OSX 10.9.4, rbenv 0.4.0, ruby 2.1.2, Homebrew 0.9.5

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/hirotakagotanda/.rbenv/versions/2.1.2/bin/ruby extconf.rb 
*** 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=/Users/hirotakagotanda/.rbenv/versions/2.1.2/bin/ruby
/Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
    from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
    from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
    from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
    from /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
    from extconf.rb:83:in `block in <main>'
    from extconf.rb:82:in `each'
    from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-1.6.6 for inspection.
Results logged to /Users/hirotakagotanda/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.6/gem_make.out
An error occurred while installing debugger (1.6.6), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.6'` succeeds before bundling.

Could anyone please provide me solution, I have been misfortunate to find out any...

Hiro Gotanda
  • 129
  • 2
  • 8

3 Answers3

0

This is likely a problem with the Xcode Command Line Tools. There are a number of steps needed to get this right.

This question Installing Ruby Debug IDE Gem provides one example.

Community
  • 1
  • 1
Peter Wooster
  • 6,009
  • 2
  • 27
  • 39
0

I ran into the same issue and solved it by agreeing to xcode's license (it seems to happen after an update and you haven't yet agreed to the update)

Just run xcodebuild -license from the command line

Found the answer thanks to this question

Community
  • 1
  • 1
user2954587
  • 4,661
  • 6
  • 43
  • 101
0

Neither of the above comments helped me. Changing to ruby 2.1.1 of below allowed me to bundle without issue.

rbenv local 2.1.1
bundle install

using ruby 2.1.2, it breaks in the same place

brent.payne
  • 5,189
  • 3
  • 22
  • 17