我需要编写一个bash脚本来在我的rails控制台中运行命令,这些命令是:Station.create(......)
#!/bin/bash
rails console在这一行之后,我就没有想法了。我试过echo "Station.create(...),但没用
发布于 2016-02-12 05:23:38
你想要runner。
#/bin/bash
# Maybe need to prefix with `bundle exec`
rails runner 'Station.create(…)'https://stackoverflow.com/questions/35348819
复制相似问题