I have win7x64 and struggling to install ruby-debug-ide to use debugger in my ide. It is failing to build gem native extensions
have tried everything i could find through net
--verbose, --pre, --with ruby etc
Its still failing (
Can anyone give some tip please? thanks
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
$ gem install ruby-debug-ide
Building native extensions. This could take a while...
System cannot find path specified
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby231-x64/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/ext
C:/Ruby231-x64/bin/ruby.exe mkrf_conf.rb
'Ёбв?┐? -? г¤ ?вбп - cвЁ гЄ § --лc Їгвм.
'Ёбв?┐? -? г¤ ?вбп - cвЁ гЄ § --лc Їгвм.
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
current directory: C:/Ruby231-x64/lib/ruby/gems/2.3.0/gems/debase-0.2.2.beta9/ext
C:/Ruby231-x64/bin/ruby.exe -r ./siteconf20170120-10104-1f4a8us.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby231-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/debase-0.2.2.beta9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby231-x64/lib/ruby/gems/2.3.0/gems/debase-0.2.2.beta9 for inspection.
Results logged to C:/Ruby231-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/debase-0.2.2.beta9/gem_make.out
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build'
C:/Ruby231-x64/lib/ruby/2.3.0/tempfile.rb:295:in `open'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/installer.rb:752:in `build_extensions'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/installer.rb:304:in `install'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:166:in `block in install'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:156:in `each'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:156:in `install'
C:/Ruby231-x64/lib/ruby/site_ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
mkrf_conf.rb:35:in `rescue in <main>'
mkrf_conf.rb:28:in `<main>'
rake failed, exit code 1
Gem files will remain installed in C:/Ruby231-x64/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0 for inspection.
Results logged to C:/Ruby231-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/ruby-debug-ide-0.6.0/gem_make.out
$ gem install debase-ruby_core_source
Successfully installed debase-ruby_core_source-0.9.6
$ gem install debase -- --with-ruby-include=C:\Ruby231-x64\lib\ruby\gems\2.3.0\gems\debase-ruby_core_source-0.9.6\lib\debase\ruby_core_source\ruby-2.3.1-p112
Building native extensions with: '--with-ruby-include=C:\Ruby231-x64\lib\ruby\gems\2.3.0\gems\debase-ruby_core_source-0.9.6\lib\debase\ruby_core_source\ruby-2.3.1-p112ruby -v'
This could take a while...
System cannot find path specified
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
$ gem install debase --pre
Building native extensions. This could take a while...
System cannot find path specified
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
$ gem install ruby-debug-ide --pre
Building native extensions. This could take a while...
Системе не удается найти указанный путь.
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.1.beta4/ext
C:/Ruby231-x64_unit/bin/ruby.exe mkrf_conf.rb
'Ёбв?┐? -? г¤ ?вбп - cвЁ гЄ § --лc Їгвм.
'Ёбв?┐? -? г¤ ?вбп - cвЁ гЄ § --лc Їгвм.
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
current directory: C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/gems/debase-0.2.2.beta9/ext
C:/Ruby231-x64_unit/bin/ruby.exe -r ./siteconf20170201-7760-7dws4t.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/debase-0.2.2.beta9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/gems/debase-0.2.2.beta9 for inspection.
Results logged to C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/debase-0.2.2.beta9/gem_make.out
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:91:in `run'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:36:in `block in build'
C:/Ruby231-x64_unit/lib/ruby/2.3.0/tempfile.rb:295:in `open'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:19:in `build'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:163:in `block (2 levels) in build_extension'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:162:in `chdir'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:162:in `block in build_extension'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:161:in `synchronize'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:161:in `build_extension'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:200:in `block in build_extensions'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:197:in `each'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/ext/builder.rb:197:in `build_extensions'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/installer.rb:741:in `build_extensions'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/installer.rb:290:in `install'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:166:in `block in install'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:150:in `each'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/request_set.rb:150:in `install'
C:/Ruby231-x64_unit/lib/ruby/site_ruby/2.3.0/rubygems/dependency_installer.rb:404:in `install'
mkrf_conf.rb:35:in `rescue in <main>'
mkrf_conf.rb:28:in `<main>'
rake failed, exit code 1
Gem files will remain installed in C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.1.beta4 for inspection.
Results logged to C:/Ruby231-x64_unit/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/ruby-debug-ide-0.6.1.beta4/gem_make.out
Related
I'm trying to install gtk3, but bundle install chokes while installing atk. Most of the responses seem to resolve around mismatched versions in the lock file. Removing the lock file doesn't help, neither does installing the matching version of bundle.
$ bundle install
Fetching gem metadata from https://rubygems.org/....
Resolving dependencies...
Using bundler 2.4.6
Fetching native-package-installer 1.1.5
Fetching pkg-config 1.5.1
Installing pkg-config 1.5.1
Installing native-package-installer 1.1.5
Fetching glib2 3.5.1
Installing glib2 3.5.1 with native extensions
Fetching atk 3.5.1
Installing atk 3.5.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1/dependency-check
rake RUBYARCHDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
RUBYLIBDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:263:in `find_spec_for_exe': can't find gem
rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
from /home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:282:in `activate_bin_path'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/rake:23:in `<main>'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `eval'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1 for inspection.
Results logged to
/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1/gem_make.out
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:102:in `run'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/rake_builder.rb:28:in `build'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:170:in `build_extension'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:204:in `block in
build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `each'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/installer.rb:843:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/source/rubygems.rb:200:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:54:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:155:in
`do_install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:146:in `block in
worker_pool'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:62:in `apply_func'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:57:in `block in process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `loop'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:90:in `block (2 levels) in
create_threads'
An error occurred while installing atk (3.5.1), and Bundler cannot continue.
In Gemfile:
atk
However, installing via gem works fine.
gem install atk -v 3.5.1
Building native extensions. This could take a while...
Successfully installed atk-3.5.1
Parsing documentation for atk-3.5.1
Done installing documentation for atk after 0 seconds
1 gem installed
This isn't a great answer, so if someone has a more in depth explanation, please feel free to give a better answer.
gem install gtk3 and bundle install use a different copy of rake.
The only difference between the two is the shebang line. The version from bundler is #!/usr/bin/env ruby_executable_hooks while the other version points to a specific version of ruby.
I'm not sure why this fails for the bundler version.
An easy workaround mentioned here: https://github.com/postmodern/digest-crc/issues/18#issuecomment-652889761 is to add gem "rake" to your Gemfile.
Trying to use rest-client gem in ruby but keep getting error: "WARNING: The rest_client gem is deprecated and will be removed from RubyGems. Please use rest-client gem instead."
Even though my code uses 'rest-client' and not 'rest_client'
#!/usr/bin/ruby
require 'rest-client'
Also, when i try to do 'gem install rest-client' it fails with:
Building native extensions. This could take a while...
ERROR: Error installing rest-client:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 mkrf_conf.rb
Building native extensions. This could take a while...
/usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/extensions/x86_64-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
from /usr/lib/ruby/2.1.0/tempfile.rb:324:in `open'
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
from /usr/lib/ruby/2.1.0/rubygems/resolver/specification.rb:78:in `install'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:206:in `block in install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in `each'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in `install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:119:in `install'
from /usr/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in `install'
from mkrf_conf.rb:15:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/unf-0.2.0.beta2/gem_make.out
Thanks for any help
I didn't have ruby dev installed... doh!
gem install: Failed to build gem native extension (can't find header files)
sudo apt-get install ruby-dev
fixed my problem
(I know that my Ruby installation is a bit messed up, but:)
I'm trying to install a native gem and it gives me an error
ytg#yui:~> sudo /usr/bin/ruby.ruby2.3 /usr/bin/gem install ruby-debug-ide
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
current directory: /usr/lib64/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/ext
/usr/bin/ruby.ruby2.3 mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
current directory: /usr/lib64/ruby/gems/2.3.0/gems/debase-0.2.2.beta9/ext
/usr/bin/ruby.ruby2.3 -r ./siteconf20161213-12983-1q9o2d7.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
*************************************************************
NOTE: If your headers were not found, try passing
--with-ruby-include=PATH_TO_HEADERS
*************************************************************
*** 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_BASE_NAME).ruby2.3
--with-ruby-dir
--without-ruby-dir
---with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib64
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/lib64/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/lib64/ruby/gems/2.3.0/gems/debase-0.2.2.beta9 for inspection.
Results logged to /usr/lib64/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta9/gem_make.out
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
/usr/lib64/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build'
/usr/lib64/ruby/2.3.0/tempfile.rb:295:in `open'
/usr/lib64/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:20:in `build'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
/usr/lib64/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
/usr/lib64/ruby/2.3.0/rubygems/installer.rb:742:in `build_extensions'
/usr/lib64/ruby/2.3.0/rubygems/installer.rb:291:in `install'
/usr/lib64/ruby/2.3.0/rubygems/request_set.rb:167:in `block in install'
/usr/lib64/ruby/2.3.0/rubygems/request_set.rb:151:in `each'
/usr/lib64/ruby/2.3.0/rubygems/request_set.rb:151:in `install'
/usr/lib64/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
mkrf_conf.rb:35:in `rescue in <main>'
mkrf_conf.rb:28:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /usr/lib64/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0 for inspection.
Results logged to /usr/lib64/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.0/gem_make.out
But then when I try to add the suggested argument, I get:
ytg#yui:~> sudo /usr/bin/ruby.ruby2.3 /usr/bin/gem install ruby-debug-ide --with-ruby-include="/usr/include/ruby-2.3.0/"
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-ruby-include=/usr/include/ruby-2.3.0/
/usr/lib64/ruby/2.3.0/rubygems/command.rb:378:in `handle_options'
/usr/lib64/ruby/2.3.0/rubygems/command.rb:299:in `invoke_with_build_args'
/usr/lib64/ruby/2.3.0/rubygems/command_manager.rb:169:in `process_args'
/usr/lib64/ruby/2.3.0/rubygems/command_manager.rb:139:in `run'
/usr/lib64/ruby/2.3.0/rubygems/gem_runner.rb:55:in `run'
/usr/bin/gem:21:in `<main>'
Is there a way to make gem install recognise those header files?
You have to separate the build flags from the options with --.
From the help page: (gem install --help)
Usage
gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options]
Later on:
Extension Install Failures
If an extension fails to compile during gem installation the gem specification is not written out, but the gem remains unpacked in the repository. You may need to specify the path to the library’s headers and libraries to continue. You can do this by adding a -- between RubyGems' options and the extension's build options:
$ gem install some_extension_gem
[build fails]
Gem files will remain installed in /path/to/gems/some_extension_gem-1.0 for inspection.
Results logged to /path/to/gems/some_extension_gem-1.0/gem_make.out
$ gem install some_extension_gem -- --with-extension-lib=/path/to/lib
[build succeeds]
I tried to install zeromq using brew on MacOSX 10.9.5. This is the output I got:
==> Downloading http://download.zeromq.org/zeromq-3.2.3.tar.gz
######################################################################## 100.0%
==> Patching
patching file tests/test_disconnect_inproc.cpp
==> ./configure --prefix=/usr/local/Cellar/zeromq/3.2.3
==> make
==> make install
==> Caveats
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
you may need to do:
ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local/opt/zeromq
==> Summary
/usr/local/Cellar/zeromq/3.2.3: 54 files, 2.3M, built in 24 seconds
And after trying to execute the command it tells me to run (ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local/opt/zeromq), it tells me that it couldn't install zmq:
Fetching: zmq-2.1.4.gem (100%)
Building native extensions with: '--with-zmq-dir=/usr/local/opt/zeromq'
This could take a while...
ERROR: Error installing zmq:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-zmq-dir=/usr/local/opt/zeromq
checking for zmq.h... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:23:in `header?'
from extconf.rb:32:in `<main>'
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/zmq-2.1.4 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/zmq-2.1.4/./gem_make.out
Does someone know what problem that is and how to resolve it?
I had a similar problem on Yosemite. I've installed zmg using port:
sudo port install zmg
followed by:
npm install zmq
and:
brew uninstall zmq
I am trying to install the ruby-debug-ide gem under ruby 2.1.2 . This to debug in Rubymine.
It worked for ruby1.9.3 but not for this version.
here is the error:
1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***
Here is the output.
I would love the ability to make sence or debug this in some way . A quick fix will also be great by the way :-)
Fetching: ruby-debug-ide-0.4.22.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
/Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
/Users/ohad/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling breakpoint.c
compiling context.c
compiling debase_internals.c
In file included from /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/method.h:14,
from /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/vm_core.h:24,
from ./hacks.h:1,
from debase_internals.c:2:
/Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debugger-ruby_core_source-1.3.5/lib/debugger/ruby_core_source/ruby-2.1.2-p95/***internal.h:209: error: expected ‘;’, ‘,’ or ‘)’ before ‘x’***
make: *** [debase_internals.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/debase-0.0.9 for inspection.
Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/extensions/x86_64-darwin-13/2.1.0-static/debase-0.0.9/gem_make.out
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:51:in `block in make'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:43:in `make'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tempfile.rb:324:in `open'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:142:in `block in install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `each'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/request_set.rb:126:in `install'
/Users/ohad/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in `install'
mkrf_conf.rb:34:in `rescue in <main>'
mkrf_conf.rb:27:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/gems/ruby-debug-ide-0.4.22 for inspection.
Results logged to /Users/ohad/.rvm/gems/ruby-2.1.2#v1_v2/extensions/x86_64-darwin-13/2.1.0-static/ruby-debug-ide-0.4.22/gem_make.out
Also, I failed to install with ruby rvm reinstall ruby-2.1.2 --disable-binary with this error
`dyld: Library not loaded: ##HOMEBREW_CELLAR##/openssl/1.0.1i/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/openssl/bin/openssl
Reason: image not found
Failed reading certificates path for '/usr/local/opt/openssl/bin/openssl' with return code: ().
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm,, for more information.
Requirements installation failed with status: 133.`
The problem seems to be that the gem debugger-ruby_core_source can’t find the header file vm_core.h, which is part of Ruby’s source code. To install the source only (given that you have the binaries installed already) do:
$ rvm fetch ruby-2.1.2
You can also reinstall from source (a bit slower but it’s a good habit):
$ rvm reinstall ruby-2.1.2 --disable-binary
Update based on your additional error message
According to your message, you need to install OpenSSL:
$ brew install openssl
To sum up:
You can’t install debugger-ruby_core_source because it needs the
Ruby source for your Ruby version.
You can’t install the Ruby source
code with RVM because the Open SSL libraries are missing.
To remedy that type rvm autolibs homebrew so that RVM will install the missing packages if needed (you might need root permissions and enter your password when requested). This also lets RVM takes care of dependency problems from now on, you shouldn’t need to type the command again.
I had a similar issue, and installing the debugger-ruby_core_source gem manually before installing ruby-debug-ide worked.
I had this happen to me today, and solved it after running brew unlink openssl && brew link openssl --force
Hope it helps.