You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the BASE_COMMAND is hardcoded to bin/rails test.
It would be wonderful to be able to configure this command to something else.
Use case
Using tilt, docker-compose or similar solution requires prefixing most of the commands in order to execute them in the container.
Having the ability to configure this command would allow for easier integration with the tools mentioned above.
One could have a custom bin/docker-rails script available that would do the path transformation and run the bin/rails test command in the correct container.
The text was updated successfully, but these errors were encountered:
It would be best to develop in an environment where rails is able to run. The best option I know for this would be DevContainers, however personally I'm not a huge fan of them, stuff just tends to break on me, so I find myself outside most of the time anyways.
You could add the following to your .bashrc or similar:
bin/rails () {
if [ "$PWD"=="/path/to/your/project" ] && [ "$1"=="test" ];thenshift;# I have a service called tests which just calls bin/rails test
docker compose run --rm tests "$@"else
./bin/rails "$@"fi;
}
The runner which currently provides schema hints will also requires rails to be able to run, so that will just not work. Overall I find this pretty hacky and not very portable but hey, at least tests will do their thing.
We have a very similar workflow, running rails on docker; so it'd be really great if we can customize the command. At the moment, all testing features are unusable for us.
Currently, the
BASE_COMMAND
is hardcoded tobin/rails test
.It would be wonderful to be able to configure this command to something else.
Use case
Using
tilt
,docker-compose
or similar solution requires prefixing most of the commands in order to execute them in the container.Having the ability to configure this command would allow for easier integration with the tools mentioned above.
One could have a custom
bin/docker-rails
script available that would do the path transformation and run thebin/rails test
command in the correct container.The text was updated successfully, but these errors were encountered: