Skip to content

Instantly share code, notes, and snippets.

@yancya
Created June 18, 2018 11:58
Show Gist options
  • Save yancya/fa1955b686a77f1ce99df125e731608d to your computer and use it in GitHub Desktop.
Save yancya/fa1955b686a77f1ce99df125e731608d to your computer and use it in GitHub Desktop.
bundle install 時に rake が見つからなくてコケる例
Fetching poppler 3.2.7
Installing poppler 3.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/poppler-3.2.7/dependency-check
rake RUBYARCHDIR=/usr/local/bundle/extensions/x86_64-linux/2.5.0/poppler-3.2.7
RUBYLIBDIR=/usr/local/bundle/extensions/x86_64-linux/2.5.0/poppler-3.2.7
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe':
can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
from /usr/local/bin/rake:23:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /usr/local/bundle/gems/poppler-3.2.7 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/2.5.0/poppler-3.2.7/gem_make.out
An error occurred while installing poppler (3.2.7), and Bundler cannot continue.
Make sure that `gem install poppler -v '3.2.7' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
poppler
The command '/bin/sh -c bundle' returned a non-zero code: 5
FROM ruby
RUN apt-get update && apt-get install -y libpoppler-dev
WORKDIR /var/app
COPY Gemfile .
RUN bundle # こける
# `RUN gem install poppler && bundle` だと成功する
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "poppler"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment