The pry gem was in the test group:
group :test do
gem 'pry', '~> 0.12.2'
end
It was working.
I moved it the another group.
group :development, :test do
gem 'pry', '~> 0.12.2'
end
If I execute rspec, the binding.pry
works. It halts execution however if I just run docker-compose up
to start the local dev env, and add binding.pry
somewhere, it does not work.
I followed the link here and rebuilt the container. Started the container however, binding.pry
still doesn't work. It doesn't halt execution.
Any insight would be appreciated.
Here's my docker-compose.yml
services:
# Port 3010 is used for accessing running app in test mode from selenium service.
# Shm size needed for tests: https://github.com/elgalu/docker-selenium/issues/20
app:
extends:
file: common-services.yml
service: evt_portal_app
command: docker/wait-for-postgres.sh db docker/start-${RAILS_ENV}.sh
shm_size: 256M
ports:
- "${PORT}:${SERVER_PORT}"
- "3010:3010"
links:
- db
- webpack_dev_server
networks:
- default
and here's my docker-compose.develop.yml
services:
# Port 3010 is used for accessing running app in test mode from selenium service.
# Shm size needed for tests: https://github.com/elgalu/docker-selenium/issues/20
app:
extends:
file: common-services.yml
service: evt_portal_app
command: docker/start-${RAILS_ENV}.sh
shm_size: 128M
ports:
- "8083:3003"
expose:
- "3010"
restart: always
mem_limit: 4g
memswap_limit: 4g
depends_on:
- delayed_job
tty: true
stdin_open: true
Here's a picture of the attached terminal (one created using docker attach <container ID>
):
As you can see, the execution is not halted.