Skip to content

Build failed in ubuntu 18.04 #2

@DmitryBochkarev

Description

@DmitryBochkarev

Hello! Thank you for this project. I have trouble building this gem.
Build with docker failing with the following scenario:

$ cat Dockerfile
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y ruby-dev bundler

RUN gem install http -v4.2.0
$ docker build .
...

Successfully installed ffi-compiler-1.0.1
Building native extensions. This could take a while...
ERROR:  Error installing http:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/http-parser-1.2.1/ext
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake RU
BYARCHDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1 RUBYLIBDIR=/va
r/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake
-12.3.1/exe/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/http-parser-1.2.1 for inspection
.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1/gem_ma
ke.out
$ docker run --rm -it ubuntu:18.04 bash
root@179ab131b3be:/# apt-get update && apt-get install -y ruby-dev bundler

...

root@179ab131b3be:/# gem install http-parser -v1.2.1
Fetching: ffi-1.11.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.11.1
Fetching: ffi-compiler-1.0.1.gem (100%)
Successfully installed ffi-compiler-1.0.1
Fetching: http-parser-1.2.1.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing http-parser:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/http-parser-1.2.1/ext
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake RUBYARCHDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1 RUBYLIBDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/http-parser-1.2.1 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1/gem_make.out

root@179ab131b3be:/# cat /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1/gem_make.out
current directory: /var/lib/gems/2.5.0/gems/http-parser-1.2.1/ext
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake RUBYARCHDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1 RUBYLIBDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/http-parser-1.2.1
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake (LoadError)

rake failed, exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions