I recently blew away and re-installed rvm to fix some issues.
Now, however, when I try and install ruby-debug19 I get:
$ gem install ruby-debug19
... then ...
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug19:
ERROR: Failed to build gem native extension.
/Users/snowcrash/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150619-25075-s8ve57.rb extconf.rb
checking for vm_core.h... 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=/Users/snowcrash/.rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
--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/snowcrash/.rvm/gems/ruby-2.2.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': uninitialized constant Ruby_core_source::Config (NameError)
from extconf.rb:19:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/snowcrash/.rvm/gems/ruby-2.2.1/gems/linecache19-0.5.12 for inspection.
Results logged to /Users/snowcrash/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/linecache19-0.5.12/gem_make.out
And the log just contains these lines.
Any suggestions?
ruby-debug19 only works on Ruby 1.9. For Ruby 2.0 and above use byebug.
gem install byebug
Related
I am getting the following error while trying to install ffi-yajl
Using berkshelf 4.3.3
Installing ffi-yajl 2.4.0 with native extensions
STDERR: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/var/lib/gems/2.5.0/gems/ffi-yajl-2.4.0/ext/ffi_yajl/ext/encoder
/usr/bin/ruby2.5 -r ./siteconf20210628-15489-1ggpxn5.rb 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=/usr/bin/$(RUBY_BASE_NAME)2.5
extconf.rb:9:in <main>': undefined method include_path' for Libyajl2:Module
(NoMethodError)
Did you mean? include
extconf failed, exit code 1
It seems to be this line that is failing:
https://github.com/chef/ffi-yajl/blob/master/ext/ffi_yajl/ext/encoder/extconf.rb#L9
unfortunately my knowledge of Ruby is very limited and I don't know if 'include_path' should be defined and if it should then why it is not defined.
Thanks
This should help you.
Here are the steps:
sudo apt remove ruby
Install ruby https://tecadmin.net/install-ruby-latest-stable-centos/#
try gem install again
Source: https://github.com/chef/ffi-yajl/issues/91
When I run gem install nokogiri -v '1.5.0', I got the following error.
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /Users/someone/.rvm/gems/ruby-2.6.5/gems/nokogiri-1.5.0/ext/nokogiri
/Users/someone/.rvm/rubies/ruby-2.6.5/bin/ruby -I /Users/someone/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0 -r ./siteconf20200620-16406-16bp1ha.rb 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
--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/someone/.rvm/rubies/ruby-2.6.5/bin/$(RUBY_BASE_NAME)
extconf.rb:10:in `<main>': uninitialized constant Config (NameError)
Did you mean? RbConfig
CONFIG
extconf failed, exit code 1
Gem files will remain installed in /Users/someone/.rvm/gems/ruby-2.6.5/gems/nokogiri-1.5.0 for inspection.
Results logged to /Users/someone/.rvm/gems/ruby-2.6.5/extensions/x86_64-darwin-18/2.6.0/nokogiri-1.5.0/gem_make.out
It looks like I have to modify the extconf.rb file. But where do I find that file?
Try installing newer version:
gem install nokogiri -v 1.6.8
I've been trying to install the Capybara-Webkit gem with bundler and after following these instructions: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#macos-sierra-1012
I keep running into the error of the Makefile not being found. I've updated Homebrew, the gem system, and updated Xcode 8 with cli tools to no avail. Would really appreciate any help!
sudo gem install capybara-webkit PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit
Password:
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-m00680.rb 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/caren/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' not available
extconf failed, exit code 1
Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection.
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out
ERROR: Could not find a valid gem 'PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/caren/.nvm/versions/node/v5.4.0/bin:/Users/caren/.rbenv/shims:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/heroku/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin:/Users/caren/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin' (>= 0) in any repository
ERROR: Could not find a valid gem 'gem' (>= 0) in any repository
ERROR: Could not find a valid gem 'install' (>= 0) in any repository
ERROR: Possible alternatives: installr, instant, instana, instacli, instapi
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-97n2eh.rb 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/caren/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' not available
extconf failed, exit code 1
Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection.
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out
The following did the trick for me (using Homebrew):
brew install qt5 --with-qtwebkit
brew link --force qt5
gem install capybara-webkit
Note: It will take a while to install the first step, and you'll need to have Xcode installed.
I hope it will help someone.
brew install qt5 --with-qtwebkit
brew install qt#5.5 or brew reinstall qt#5.5
echo ‘export PATH=“/usr/local/opt/qt#5.5/bin:$PATH”’ >> ~/.bash_profile
source ~/.bash_profile
brew unlink qt#5.5 && brew link --force qt#5.5
I got these message while installing mechanize Gem:
[root#nemon ~]# gem install mechanize
> (RuntimeError) You have to install development tools first.
Whole log:
Building native extensions. This could take a while... ERROR: Error installing mechanize:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb checking for main() in -lstdc++... *** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib /usr/share/ruby/mkmf.rb:434:in try_do: The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
from /usr/share/ruby/mkmf.rb:519:in try_link0
from /usr/share/ruby/mkmf.rb:534:in try_link
from /usr/share/ruby/mkmf.rb:720:in try_func
from /usr/share/ruby/mkmf.rb:950:in block in have_library
from /usr/share/ruby/mkmf.rb:895:in block in checking_for
from /usr/share/ruby/mkmf.rb:340:in block (2 levels) in postpone
from /usr/share/ruby/mkmf.rb:310:in open
from /usr/share/ruby/mkmf.rb:340:in block in postpone
from /usr/share/ruby/mkmf.rb:310:in open
from /usr/share/ruby/mkmf.rb:336:in postpone
from /usr/share/ruby/mkmf.rb:894:in checking_for
from /usr/share/ruby/mkmf.rb:945:in have_library
from extconf.rb:6:in <main>
Gem files will remain installed in `/usr/local/share/gems/gems/unf_ext-0.0.7.1` for inspection.
Results logged to `/usr/local/share/gems/gems/unf_ext-.0.7.1/ext/unf_ext/gem_make.out`
I'm trying to install the curb gem on windows 8 but it returns errors. I was also trying by providing option like --with-curl-dir, --with-curl-lib, --with-curl-include but not working. Every time it return the error.Please give any suggestion. Thanks
C:\Users>gem install curb -- --with-curl-lib=C:/curl-7.21.0-devel-mingw32/bin --with-curl-include=C:/curl-7.21.0-devel-mingw32/include
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-curl-lib=C:/curl-7.21.0-devel-mingw32/bin --with-curl-include=C:/curl-7.21.0-devel-mingw32/include
checking for curl-config... no
checking for main() in -lcurl... 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=C:/Ruby193/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include=${curl-dir}/include
--with-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:23:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError)
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.6/ext/gem_make.out
You should have curl library installed on you machine in root directory then try following command in command prompt
gem install curb -v 0.8.6 --platform=ruby -- --with-curl-lib=C:/curl-7.34.0-devel-mingw32/bin --with-curl-include=C:/curl-7.34.0-devel-mingw32/include