rainbow
rainbow copied to clipboard
Installation on default Ubuntu 16.04 for release 2.2.2 is broken still
I hope it may be something in my setup but the installation of version 2.2.2 still appears to be broken:
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out
I am trying with a clean Ubuntu 16.04 build and ruby that ships with it.
Do you know what rubygems version does Ruby 2.3 in Ubuntu 16.04 ships with?
@gnufied as I mentioned, the issue could be related to the rubygems version that's shipped with ubuntu
@sickill now that I think about it, I'm confused why rubygems tries to build a native extension, since I don't see any C code in this repo...
@swrobel The gemspec has an "extension" hook, which uses the rake
type (not the Makefile type) of extension building.
This functions as an "after install" step, to do some other installs (on Windows, mostly, IIRC).
I've encountered this as well. Any workarounds?
OS: Ubuntu 16.04
Ruby: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
(stock)
RubyGems: 2.5.1
FYI I got this to work by manually adding rake via gem install rake
, after reading a similar issue here:
https://askubuntu.com/questions/872399/error-failed-to-build-gem-native-extension-when-trying-to-download-rubocop
It's possible that reverting this commit would fix the issue: https://github.com/sickill/rainbow/commit/296bedfcbc016cbd04b2b46172d81d7a47b53442#diff-00a69d93d482fd0c12dab5680cf89632
Steps to replicate this issue:
- Start with a fresh ubuntu 16.04 (I used multipass to create the VM)
- Install ruby
sudo apt install ruby
- Install rainbow
sudo gem install rainbow:2.2.2
- Error is displayed.
Fetching: rainbow-2.2.2.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out
System specs:
Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64)
Ruby: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
RubyGems: 2.5.2.1
@sickill is this a viable solution?
It's possible that reverting this commit would fix the issue: https://github.com/sickill/rainbow/commit/296bedfcbc016cbd04b2b46172d81d7a47b53442#diff-00a69d93d482fd0c12dab5680cf89632
Thank you for considering rainbow support.
But, realistically, we will not change the software to support EOL Ubuntu versions. The EOL occurred April 30th 2021.
Thanks for making the repro - but I will close this as wontfix.