I'm writing an executable shell script that does something in the rails console using rails runner. How do I see the results of the ruby command made and print them to the screen.
I tried running the script with -v for verbose but I still wasn't able to see what occurred.
#!/bin/sh
sudo rails runner "Model.print_something"
sudo rails runner "Model.print_something"directly from terminal?rails consoleinstead, sincerails runnersays runner runs Ruby code in the context of Rails non-interactively.