sverhoeven / docker-cartodb

Dockerized CartoDB
BSD 3-Clause "New" or "Revised" License
147 stars 117 forks source link

Docker build fails because of gem builder #86

Open Baschdl opened 4 years ago

Baschdl commented 4 years ago

Building the master as well as the py3pg12postgis3 branch with docker build -t=sverhoeven/cartodb docker-cartodb/ errors with:

Done installing documentation for rack after 7 seconds
15 gems installed
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
    from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
    from /usr/local/bin/bundle:23:in `<main>'
The command '/bin/sh -c git clone --recursive git://github.com/CartoDB/cartodb.git &&     cd cartodb &&     git checkout $CARTODB_VERSION &&     cd lib/sql &&     PGUSER=postgres make all install &&     service postgresql start && /bin/su postgres -c       /tmp/cartodb_pgsql.sh && service postgresql stop &&     cd - &&     npm install &&     rm -r /tmp/npm-* /root/.npm &&     perl -pi -e 's/gdal==2\.2\.2/gdal==2.4.2/;s/redis==2\.4\.9/redis==2.7.3/;' python_requirements.txt &&     pip3 install --no-binary :all: -r python_requirements.txt &&     gem install bundler --version=1.17.3 && gem install compass archive-tar-minitar rack &&     bundle update thin &&     /bin/bash -l -c 'bundle install' &&     cp config/grunt_development.json ./config/grunt_true.json &&     /bin/bash -l -c 'bundle exec grunt'' returned a non-zero code: 1

Btw: Why do you execute all the commands as one command? Using the caching of Docker would greatly speed up the iterative fixing

Baschdl commented 4 years ago

This is a bug in RubyGems: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html Sadly cartoDB's PR doesn't have a description but they also updated the bundler version yesterday: https://github.com/CartoDB/cartodb/pull/15688

Baschdl commented 4 years ago

They bundled the Gemfile.lock with version 2.1.4 (https://github.com/CartoDB/cartodb/blob/0a3e9f5d1e81d179150a50d5c924f0cf49350e46/Gemfile.lock#L566) but the specified gem 'rails', '4.2.11' (https://github.com/CartoDB/cartodb/blob/0a3e9f5d1e81d179150a50d5c924f0cf49350e46/Gemfile#L3) depends on bundler (>= 1.3.0, < 2.0). Opened issue in cartodb's repository: https://github.com/CartoDB/cartodb/issues/15692