I've the next docker-compose container:
# docker-compose.yml
version: '2'
services:
web:
build: .
ports:
- "80:80"
volumes:
- .:/home/app/NAME_OF_MY_APP
db:
image: postgres:9.4
ports:
- "5432"
environment:
POSTGRES_USER: 'postgres'
I cannot figure out how can I run the rails console. I'm using the passenger/nginx image and everything is working. However, my DB is on another container and I'd like to entry at rails console to create manually a couple of users.
I tried with:
sudo docker-compose run web rails c
But it appears the next error:
ERROR: Cannot start service web: oci runtime error: exec: "rails": executable file not found in $PATH
Also, I tried:
sudo docker-compose run web "rails c"
But it stills showing the same output.
I'd like to entry at console, entry some users and store it on the postgres DB.
Thanks in advance!