Closed llekn closed 5 years ago
It can be fixed modifying the docker-ci
files:
Dockerfile.ci
:
FROM platanus/ruby:2.5
RUN gem install bundler --version 2.0.1
RUN mkdir /app
WORKDIR /app
ADD . /app
docker-compose.ci.yml
:
---
version: '3.4'
services:
test:
build:
context: "."
dockerfile: Dockerfile.ci
volumes:
- "test_data:/usr/local/bundle"
environment:
RACK_ENV: test
DB_USER: postgres
DB_HOST: postgresql
DB_PORT: '5432'
links:
- postgresql
postgresql:
image: postgres:11.3
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
volumes:
test_data:
After applying those changes another error ocurred with webpacker
The git source git://github.com/rails/webpacker.git is not yet checked out. Please run 'bundle install' before trying to start your application
It was solved by removing the , github: 'rails/webpacker'
from gem 'webpacker'
in the Gemfile
Another problem: webpacker
wasn't installed from the beginning due to a package being incompatible with node version 9:
Maybe we should ad a .node-version
file in the recipe
The last two comments were extracted to a separate issue: #217
@blackjid this should be solved with platanus/docker-ruby#2. I tested it in a project with bundler 2 (and removing the fix it had) and CI ran without any problems, I'm closing it.
Newly created projects use bundler 2.0.1 in their
Gemfile
which breaks the CI with the following error: