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.
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
Context:
I ran gem uninstall --all in a "scorched-earth" attempt to debug a persistent Capybara error I was experiencing. My plan was to then run bundle install in the folder where my Gemfile is, and re-install the necessary gems with their correct versions. However, running that command resulted in the following:
Could not find addressable-2.3.6 in any of the sources
So I attempted to install the addressable gem by itself (i.e. gem install addressable), and that seemed to work fine. However when I re-ran bundle install, I got the following:
Could not find websocket-driver-0.3.4 in any of the sources
Attempting the same strategy (gem install websocket-driver) resulted in the following:
Fetching: websocket-driver-0.3.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing websocket-driver:
ERROR: Failed to build gem native extension.
/Users/richiethomas/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb
creating Makefile
make clean
make
compiling websocket_mask.c
make: *** [websocket_mask.o] Segmentation fault: 11
make failed, exit code 2
Gem files will remain installed in /Users/richiethomas/.rvm/gems/ruby-1.9.3-p547/gems/websocket-driver-0.3.4 for inspection.
Results logged to /Users/richiethomas/.rvm/gems/ruby-1.9.3-p547/extensions/x86_64-darwin-13/1.9.1/websocket-driver-0.3.4/gem_make.out
The contents of the gem_make.out file referenced above are:
creating Makefile
make clean
make
compiling websocket_mask.c
make: *** [websocket_mask.o] Segmentation fault: 11
make failed, exit code 2
My best guess is that I was too hasty in uninstalling all the things, and accidentally uninstalled something related to ruby and/or C compilation. I can't be sure though, because I don't know what a "make" is, or why it failed (according to the .out file).
UPDATE:
I tried running xcode-select --install from the command line, hoping this would solve any potential compilation errors, but no joy.
I ran rvm reinstall ruby-1.9.3 --with-gcc=clang, and this allowed me to install the version of websocket-driver that I wanted.
What helped me on Win 7 x64 was
gem install --verbose websocket-driver
But that not always works for some reason
I'm failing to install Jekyll using gem in Ruby. Here's the output messages:
D:\Ruby21\bin>gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
D:/Ruby21/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR=" clean
Makefile:238: *** multiple target patterns. Stop.
make "DESTDIR="
Makefile:238: *** multiple target patterns. Stop.
make failed, exit code 2
Gem files will remain installed in D:/Ruby21/lib/ruby/gems/2.1.0/gems/redcarpet-3.2.0 for inspection.
Results logged to D:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/redcarpet-3.2.0/gem_make.out
D:\Ruby21\bin>
Unlike the other issue here, where the error breaks in the Makefile on line 222, mine breaks in the Makefile on line 238.
I can tell it has nothing to do with spaces in my installation path (since I installed Ruby in the root of my D drive). But anything from there is beyond my scope.
I'm using Windows Vista x86. I have installed Ruby 2.1.0 stable.
Does anyone know how to fix this?
Nevermind, I didn't solve the problem, but rather I used a workaround.
I installed Cygwin-x86 on my laptop, then installed Ruby and Rubygem, finally installed Jekyll and managed to go past the redcarpet-v3.2.0 build error.
To install Jekyll in Cygwin:
Run cygwin-setup.exe.
Install appropriate packages: Ruby, rubygem, make, gcc, git, libxslt, libxml2. Some more packages may be required here.
Install jekyll using gem install jekyll. Wait.
Type in command: vim ~/.bashrc
Scroll to the end and add export PATH=$PATH:".gem/ruby/gems/jekyll-2.4.0/bin"
That's how the Jekyll is installed on Cygwin.
Later on, you may need the following:
Subversion
bzip2
apt-cyg
patch
curl
rvm
jemoji
jekyll-sitemap
And have to do a lot of ~/.bashrc editing, calling source $HOME/path/to/rvm and PATH fixing.
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'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