Failed to build byebug native gem extension - ruby

I literally looked everywhere and couldnt find an answer to it. I installed ruby on my windows with the installer they proviude on their website. Yes, i am running it on a 64 bit which is what my devkit is on. idk what to do i literally looke everywehreeeee someone please help!!!
ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
C:\Users\ASUS>gem install byebug
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing byebug:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/byebug-11.0.0/ext/byebug
C:/Ruby25-x64/bin/ruby.exe -I C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190314-10812-4pefs.rb extconf.rb
creating Makefile
current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/byebug-11.0.0/ext/byebug
make "DESTDIR=" clean
current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/byebug-11.0.0/ext/byebug
make "DESTDIR="
generating byebug-x64-mingw32.def
compiling breakpoint.c
In file included from c:/Ruby25-x64/include/ruby-2.5.0/ruby/ruby.h:29:0,
from c:/Ruby25-x64/include/ruby-2.5.0/ruby.h:33,
from byebug.h:4,
from breakpoint.c:1:
c:/Ruby25-x64/include/ruby-2.5.0/ruby/defines.h:151:22: fatal error: setjmpex.h: No such file or directory
compilation terminated.
make: *** [breakpoint.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/byebug-11.0.0 for inspection.
Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/byebug-11.0.0/gem_make.out

Related

ERROR: Error installing json: ERROR: Failed to build gem native extension. Windows 10

When I run Bundle Install I am coming across this issue:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/json-2.1.0/ext/json/ext/generator
/usr/bin/ruby2.3 -r ./siteconf20180320-1003-beh1w0.rb 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.3.0/gems/json-2.1.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/json-2.1.0/gem_make.out
I am on windows 10. How do I resolve this issue as I cannot run my cucumber tests from command line.
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
Some Ruby gems need to be compiled from source on your machine. This requires additional files in your Ruby installation as well as all of the tools and libraries that the gem needs for building.
Getting all of this working on Windows on your own is very, very hard. So instead you should use the Ruby installer to get your Ruby and dev environment set up correctly.

Cannot install gem file

I've been on this for a few hrs already googled everything. Tried tons of answers, im using ruby x64 and devkit x64 (originaly isntalled the incorect one x32 but i just deleted it and installed the correct one x64)
Cant install json or (my actual target) ruby-debug-ide -v 0.4.32
gem version = 2.4.7
ruby version =ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
C:\WINDOWS\system32>gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171013-12212-1y42085.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
c:/ruby24-x64/programing/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
make: *** [generator.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out
You might want to try a cloud9 editor, and per this tutorial https://www.railstutorial.org/book/beginning
It will save you quite a bit of pain setting up your rails environment.

gem install json issue with Mac OS X 10.11

I'm trying to install Ruby/JSON on Mac OS X 10.11.
However, the gem install command gives the error message:
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/smcho/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20151025-39148-au2m2x.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
ld: warning: directory not found for option '-L/Users/haven/.sm/pkg/active/lib'
make "DESTDIR=" install
./install -m 0755 generator.bundle ./.gem.20151025-39148-i7g03f/json/ext
make: ./install: No such file or directory
make: *** [install-so] Error 1
make install failed, exit code 2
Gem files will remain installed in /Users/smcho/.rvm/gems/ruby-2.2.1/gems/json-1.8.3 for inspection.
Results logged to /Users/smcho/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/json-1.8.3/gem_make.out
The message says make: ./install: No such file or directory, but I'm not sure how to fix this issue.
Is this a known issue, or is there a way to bypass this one?
This is my system version. I executed gem update --system to get the latest version.
> ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
> gem -v
2.4.8
I should have used the latest ruby (2.2.3) not the old one (2.2.1)
ruby-rails-sample> rvm --default use 2.2.3
Using /Users/smcho/.rvm/gems/ruby-2.2.3
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
Successfully installed json-1.8.3
Parsing documentation for json-1.8.3
Installing ri documentation for json-1.8.3
Done installing documentation for json after 1 seconds
1 gem installed

Error Installing github-pages gem in command line on Windows

I've managed to setup Ruby 1.9.3 and devkit as well as jekyll and a bunch of other gems. However, now when I try installing github-pages gem (gem install github-pages) I get the following error:
Note: I've tried running command line as an admin with no more success
Here's the output from my command line:
Temporarily enhancing PATH to include DevKit... Building native
extensions. This could take a while... ERROR: Error installing
github-pages:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20141208-60036-a7hzln.rb extconf.rb creating Makefile
make clean Makefile:165: *** target pattern contains no `%'. Stop.
make Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in
C:/Ruby193/lib/ruby/gems/1.9.1/gems/redcarpet
-3.1.2 for inspection. Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/re
dcarpet-3.1.2/gem_make.out
Well I couldn't find the answer on SO so I looked around elsewhere and was able to find the answer on GitHub. Please see here:
https://github.com/rubygems/rubygems/issues/977
Basically, if you're getting this error on Windows using RubyGems 1.9.3 (which I was) you need to downgrade to 1.8.29 until this is fixed. Glad to know it's not just me making this error!
How to downgrade, you may be asking? On Windows:
gem update --system 1.8.29
I downgraded and had no trouble installing the other gem files I needed.

json doesn't install

I am having a problem getting my ruby system up and running. Specifically, I get the following error when trying
gem install json
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating parser-i386-mingw32.def
compiling parser.c
gcc.exe: CreateProcess: No such file or directory
make: *** [parser.o] Error 1
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.3/ext/json/ext/pa
I know that my gcc works. I don't get the same error when installing
`gem install json_pure
However, when I try a
bundle install
I get the error. I am extremely new to ruby and rails, so any help would be appreciated.
install devkit with --force option

Resources