I'm running Windows7 and I've having great difficulty installing the json gem. The error I'm getting hasn't been addressed anywhere. I have installed DevKit through the RailsInstaller and when I run gem install json I get the following error:
C:\Users\Gavin>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:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
make
Makefile:161: warning: overriding commands for target `install-so'
Makefile:160: warning: ignoring old commands for target `install-so'
Makefile:162: *** missing separator. Stop.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/bin;/gems/json-1.7.5 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/bin;/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
Anyone have any ideas what may be going on here?
i suppose your devkit-folder is in the path ? Otherwise try it with "gem install json_pure" instead. See this article that explains why http://ruby.about.com/od/tasks/a/The-Json-Gem.htm
Related
I am trying to update psych to 5.0.0, but I get the following error message:
Updating psych
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing psych:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.0/ext/psych
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0 extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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:
.
.
.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/psych-5.0.0 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.0.0/gem_make.out
Tried gem update, gem pristine --all, same error.
Any tips how to fix this in Windows?
Thank you!
Not sure how it was fixed but I ran gem update and psych was updated to 5.0.2 without an error.
I had a similar problem on Mac running OSX 13.2. Bundle install failed because it couldn't find yaml.h.
Since I was on Mac and running Homebrew, I did a
brew install libyaml
and then re-ran bundle install. It worked correctly.
You need to install libyaml via pacman -S mingw-w64-ucrt-x86_64-libyamlin the command prompt with ruby
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.
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.
I installed compass and sass and everything worked correctly. But now I am trying to install singularity and breakpoint and I am getting this error over and over:
Sayras-iMac:~ sayralopez$ sudo gem install breakpoint
Building native extensions. This could take a while...
ERROR: Error installing breakpoint:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/extensions/universal-darwin-12/1.8/ffi-1.9.3/gem_make.out
I am still a newb at terminal commands, so I have no idea what is going on. I tried reinstalling and updating ruby and it still wont work. Any idea what could be going on and how to fix it?
MANY THANKS!
Install Ruby Version Manager first:
$ ruby install rvm
After installing rvm, I was able to install breakpoint and sigularity (and susy!)
Hope that helps!
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