Failed to build gem native extension for ruby-debug-base19x - ruby-on-rails

I am new to Ruby On Rails, I am installing the gem, ruby-debug-base19x. But without successful. I found some similar answer but no help.
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19x:
ERROR: Failed to build gem native extension.
/opt/redmine-2.4.2-0/ruby/bin/ruby extconf.rb
checking for vm_core.h... no
/opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib /ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
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=/opt/redmine-2.4.2-0/ruby/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
/opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:270:in `block (2 levels) in read': Failed to download http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz: Forbidden (RuntimeError)
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1323:in `block (2 levels) in transport_request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:2672:in `reading_body'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1322:in `block in transport_request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1294:in `request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1287:in `block in request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:746:in `start'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/net/http.rb:1285:in `request'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/1.9.1/tempfile.rb:320:in `open'
from /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
from extconf.rb:19:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz
Gem files will remain installed in /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/linecache19-0.5.12 for inspection.
Results logged to /opt/redmine-2.4.2-0/ruby/lib/ruby/gems/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
I also check the mkmf.log,
have_header: checking for vm_core.h... -------------------- no
"gcc -E -I/opt/redmine-2.4.2-0/ruby/include/ruby-1.9.1/x86_64-linux -I/opt/redmine-2.4.2-0/ruby/include/ruby-1.9.1/ruby/backward -I/opt/redmine-2.4.2-0/ruby/include/ruby-1.9.1 -I. -I/opt/redmine-2.4.2-0/ruby/include/ruby-1.9.1/ruby-1.9.3-p484 -I/opt/redmine-2.4.2-0/common/include -fPIC -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -O3 conftest.c -o conftest.i"
conftest.c:3:21: error: vm_core.h: No such file or directory
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <vm_core.h>
/* end */

You got a 403 trying to download the source tarball. From the log:
Failed to download http://ftp.ruby-lang.org/[-snipped-].tar.gz: Forbidden
I just tried the URL and it's accessible for me. Try again. Maybe it was a one-time hiccup.

Related

Fail to install install racc -v '1.6.0'

I'm trying to install the racc gem v1.6.0 in an Alpine 3.13 with Ruby 2.7.5p203.
But the following error is being thrown:
Building native extensions. This could take a while...
ERROR: Error installing racc:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/racc-1.6.0/ext/racc/cparse
/usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r ./siteconf20220617-518-10udcz7.rb extconf.rb
checking for rb_block_call()... *** 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/bin/$(RUBY_BASE_NAME)
/usr/local/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/2.7.0/mkmf.rb:564:in `try_link0'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:582:in `try_link'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:794:in `try_func'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:1083:in `block in have_func'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
from /usr/local/lib/ruby/2.7.0/mkmf.rb:1082:in `have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/bundle/extensions/x86_64-linux-musl/2.7.0/racc-1.6.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/bundle/gems/racc-1.6.0 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux-musl/2.7.0/racc-1.6.0/gem_make.out
This is the content of the log file indicated above:
"gcc -o conftest -I/usr/local/include/ruby-2.7.0/x86_64-linux-musl -I/usr/local/include/ruby-2.7.0/ruby/backward -I/usr/local/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
The error also happens when trying to update any gem in the Gemfile.

Error on mac osx terminal when I want to install compass

I use this command in terminal to installing Compass
sudo gem install compass
but i have this error
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151009-533-1bqe35q.rb extconf.rb
checking for ffi.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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/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:1038:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:889: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:888:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1037:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/ffi-1.9.10/gem_make.out
I accepted xcode command line license agreement, but still have problem on installing this gem. please help to me.
also maybe need to know I updated my gems with this command
sudo gem update --system
based on this link: http://compass-style.org/install/

Cocoapods Installation Not Going Through

I had a problem regarding installing cocoapods on my mac. Below is my error code i got in my terminal.I don't know what i do wrong and what should i do to fix this.I already tried to google the same problem but nothing working out. Any help will be much appreciated. thank you.
Building native extensions. This could take a while...
/opt/local/lib/ruby1.9/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/opt/local/bin/ruby" -rubygems /opt/local/lib/ruby1.9/gems/1.9.1/gems/rake-0.9.2.2/bin/rake RUBYARCHDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext RUBYLIBDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext
/opt/local/bin/ruby extconf.rb
/opt/local/lib/ruby1.9/1.9.1/rake/file_utils.rb:68: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
checking for -std=c99 option to compiler... *** 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=/opt/local/bin/ruby
/opt/local/lib/ruby1.9/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 /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:491:in `block in try_compile'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:443:in `with_werror'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:491:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:254:in `open'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:254:in `open'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:280:in `postpone'
from /opt/local/lib/ruby1.9/1.9.1/mkmf.rb:789:in `checking_for'
from extconf.rb:23:in `<main>'
rake aborted!
Command failed with status (1): [/opt/local/bin/ruby extconf.rb...]
Tasks: TOP => default => ext
(See full trace by running task with --trace)
Gem files will remain installed in /opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1 for inspection.
Results logged to /opt/local/lib/ruby1.9/gems/1.9.1/gems/xcodeproj-0.16.1/ext/xcodeproj/gem_make.out

stuck on installing ruby rails

im following a tutorial to do this and done step by step untill this came up i seen somone had the same issue but wasnt sorted please someone direct me on how to finish off what im asking it to do many thanks
c:\dev\mysql2>gem install mysql2-0.3.13.gem --no-ri --no-rdoc -- --with-mysql-di
r=c:\mysql-connector-c-noinstall-6.0.2-win32
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir=c:\mysql-connector-c-noinstal
l-6.0.2-win32'
This could take a while...
ERROR: Error installing mysql2-0.3.13.gem:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-mysql-dir=c:\mysql-connector-c-noi
nstall-6.0.2-win32
checking for rb_thread_blocking_region()... *** 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
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:1004:in `block in have_func'
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:1003:in `have_func'
from extconf.rb:9:in `<main>'
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.
3.13 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/ext/mysql2/g
em_make.out
c:\dev\mysql2>
I would highly reccomend using RailsInstaller to create a development stack on windows.
http://railsinstaller.org/en

Installing ruby debug19. Compiler failed to generate an executable file

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

Resources