I need to wirte a bash script to run commands in my rails console, the commands are : Station.create(......)
#!/bin/bash
rails console
After this line i have no ideas. i tried echo "Station.create(...)
, but it doesn't help
I need to wirte a bash script to run commands in my rails console, the commands are : Station.create(......)
#!/bin/bash
rails console
After this line i have no ideas. i tried echo "Station.create(...)
, but it doesn't help
You want runner
.
#/bin/bash
# Maybe need to prefix with `bundle exec`
rails runner 'Station.create(…)'