Mac OSX 10.9.1, ruby 1.9.3p194, rails 3.2.13, XCode 5.0.2
Trying to do 'bundle install' but keep getting an error w/ debugger 1.6.5 (running gem install debugger -v '1.6.5' yields the same error). Any help is greatly appreciated!
Installing debugger (1.6.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for rb_method_entry_t.called_id in method.h... *** 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
--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/rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1002:in `block in have_struct_member'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1001:in `have_struct_member'
from extconf.rb:34:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/debugger-ruby_core_source-1.3.1/lib/debugger/ruby_core_source.rb:21:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/debugger-ruby_core_source-1.3.1/lib/debugger/ruby_core_source.rb:21:in `create_makefile_with_core'
from extconf.rb:87:in `<main>'
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/debugger-1.6.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/debugger-1.6.5/ext/ruby_debug/gem_make.out
An error occurred while installing debugger (1.6.5), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.5'` succeeds before bundling.
This should solve your problem:
xcode-select --install
source: https://stackoverflow.com/a/19570890/702560
The solution worked for me was to use ruby version 1.9.3.
Related
I am getting following error while installing unicorn on Ruby 2.2.2
root#magnificent-apps:~# gem install unicorn --no-ri --no-rdoc
Building native extensions. This could take a while...
ERROR: Error installing unicorn:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20170116-4446-95pp1l.rb extconf.rb
checking for mmap() in sys/mman.h... *** 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/rvm/rubies/ruby-2.2.2/bin/$(RUBY_BASE_NAME)
--with-atomic_ops-dir
--without-atomic_ops-dir
--with-atomic_ops-include
--without-atomic_ops-include=${atomic_ops-dir}/include
--with-atomic_ops-lib
--without-atomic_ops-lib=${atomic_ops-dir}/lib
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:1020:in `block in have_func'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:1019:in `have_func'
from extconf.rb:4:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.2/gems/raindrops-0.17.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/raindrops-0.17.0/gem_make.out
Can anybody suggest how to fix this?
Try this from your terminal sudo apt-get install build-essential to install all needed dependencies. It did trick for me.
I am trying to intsall middleman - a static site generator, which uses ruby gems. It is able to build all native extensions but not wdm. I am getting the below error message when I run install bundler command in my command prompt.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe -r ./siteconf20140814-4200-t0fvuf.rb extconf.rb
checking for main() in -lkernel32... *** 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=C:/Ruby200/bin/ruby
--with-kernel32lib
--without-kernel32lib
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to genera
te an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:720:in `try_func'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:950:in `block in have_library'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postp
one'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:945:in `have_library'
from extconf.rb:19:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/wdm-0.1.0
for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/wd
m-0.1.0/gem_make.out
An error occurred while installing wdm (0.1.0), and Bundler cannot continue.
Make sure that `gem install wdm -v '0.1.0'` succeeds before bundling.
Do I need to install something before running it.
The answer is in the logs actually. the gem "wdm" which makes the bundle install fail requires the "development tools" to be installed.
You can install those by following the instructions there.
I'm working on my first ruby on rails course, building an application. Below is the error I am getting in the terminal when running the bundle install command. I am trying to add the gem 'devise'. I have no idea how to get past this error. Thanks!
Installing bcrypt (3.1.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for ruby/util.h... *** 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
--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/rvm/rubies/ruby-1.9.3-p194/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:14:in `<main>'
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bcrypt-3.1.7 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bcrypt-3.1.7/ext/mri/gem_make.out
An error occured while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
you missing gcc if you use homebrew
brew tap homebrew/dupes
then
brew install apple-gcc42
on linux centos/fedora:
yum install gcc
on linux ubuntu:
apt-get install build-essential
Please update if it helps you.
hs-mac-air:~ zuohaisu$ sudo gem install bson_ext -v '1.9.2'
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
/Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
checking for asprintf()... *** 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
--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/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/bin/ruby
/Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/zuohaisu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
from extconf.rb:3:in `<main>'
Gem files will remain installed in /Users/zuohaisu/.rvm/gems/ruby-1.9.3-p429/gems/bson_ext-1.9.2 for inspection.
Results logged to /Users/zuohaisu/.rvm/gems/ruby-1.9.3-p429/gems/bson_ext-1.9.2/ext/cbson/gem_make.out
I tried to install bson_ext but always failed. can somebody help?
My rails version is 1.9.3
My Mongo shell version is 2.4.3
My rails version is 4
It is said that some libraries missing. what does that mean?
try
gem update --system
gem install bson_ext
if all else fails download the gem
http://rubygems.org/gems/bson_ext
and add it to your gemsets manually
I had the exact same issue and installed gcc to resolve, thanks for the hint by gspatel.
yum install gcc
I am trying to install ruby debug 19 so I can run spork. I am getting errors though that are very frustrating. I've googled for a while to no avail. I am running 1.9.3-p194.
Here's the error message:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug19:
ERROR: Failed to build gem native extension.
/Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... *** 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
--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/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1002:in `block in have_struct_member'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/jasonvdm/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1001:in `have_struct_member'
from extconf.rb:10:in `block in <main>'
from /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call'
from /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
from extconf.rb:24:in `<main>'
I had a similar problem, but with installing the nokogiri gem, and I solved it with the following:
cd /usr/bin
sudo ln -s llvm-gcc-4.2 gcc-4.2
See Bundle update & install fail after OS X lion upgrade - Rails 3
Use the debugger gem instead. ruby-debug19 never grew up to support ruby1.9.3