Closed prognostikos closed 2 years ago
Ah, of course, it was because at the time I didn't have the web container running so there was no web container to exec inside of. So maybe not necessary after all.
Correct, you can keep it as the default exec
, but the container needs to be running already which would likely be the case if you're actively developing the project and have things up and running.
I ran into a problem running rails generators with the run script via e.g.
./run rails g model MyModel my_attr
. There was no output from the command and no changes were made.Adding
DC=run
inside therails
function fixes it for me - it seemsdocker-compose exec
won't work with the generators whiledocker-compose run
does.I'm not sure if this should be a default or not but thought I'd mention it in case anyone else runs into the problem.