Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Cedar 上向 heroku 控制台发送命令的正确方法是什么?
heroku console 2+2适用于较旧的堆栈 - 它警告我heroku run console在雪松上使用。
heroku console 2+2
heroku run console
当我跑
heroku run console 2+2
它加载不需要的"2+2"环境并打开一个控制台。
"2+2"
Loading 2+2 environment (Rails 3.2.3) irb(main):001:0>
那么在 Cedar 上向 heroku 控制台发送命令的正确方法是什么?
这不是最漂亮的解决方案,但是通过管道输入命令确实有效。
echo "2 + 2" | heroku run console
查看代码,似乎没有(当前)内置方法可以做到这一点。