rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Installation on default Ubuntu 16.04 for release 2.2.2 is broken still

Open gnufied opened this issue 7 years ago • 6 comments

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.

gnufied avatar Aug 29 '17 13:08 gnufied

Do you know what rubygems version does Ruby 2.3 in Ubuntu 16.04 ships with?

ku1ik avatar Aug 31 '17 08:08 ku1ik

@gnufied as I mentioned, the issue could be related to the rubygems version that's shipped with ubuntu

swrobel avatar Sep 05 '17 00:09 swrobel

@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 avatar Sep 08 '17 08:09 swrobel

@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).

olleolleolle avatar Sep 08 '17 09:09 olleolleolle

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

trevrosen avatar Oct 13 '17 15:10 trevrosen

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

trevrosen avatar Oct 13 '17 15:10 trevrosen

Steps to replicate this issue:

  1. Start with a fresh ubuntu 16.04 (I used multipass to create the VM)
  2. Install ruby sudo apt install ruby
  3. Install rainbow sudo gem install rainbow:2.2.2
  4. 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

fbuys avatar Nov 01 '22 22:11 fbuys

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.

olleolleolle avatar Nov 02 '22 08:11 olleolleolle