简体   繁体   English

rails:heroku 运行控制台给出错误“bash:控制台:找不到命令”

[英]rails: heroku run console giving error “bash: console: command not found”

Using the cedar-14 stack on Heroku.在 Heroku 上使用 cedar-14 堆栈。 Just noticed that I can no longer run heroku run console because I get the error:刚刚注意到我无法再运行heroku run console因为我收到错误:

bash: console: command not found bash:控制台:找不到命令

I can still get to the console by calling:我仍然可以通过调用进入控制台:

heroku run bundle exec rails console

But I'm wondering what might have caused this change.但我想知道是什么导致了这种变化。 I only noticed the issue after several days of commits so I can pinpoint the issue.我只是在提交几天后才注意到这个问题,所以我可以查明问题。

You need to use你需要使用

heroku run rails console heroku run rails 控制台

The Basics for Heroku are explained under Heroku Devcenter . Heroku 的基础知识在Heroku Devcenter下进行了解释。

Try试试

heroku run /app/bin/rails console

I happened to see this problem for a preview apps.我碰巧在预览应用程序中看到了这个问题。 For regular apps heroku console works.对于常规应用程序, heroku console有效。

I run into the same problem but I have resolved it by removing heroku/metrics build pack.我遇到了同样的问题,但我已经通过删除heroku/metrics构建包解决了它。 I have followed the configuration given for Ruby Language Metrics https://devcenter.heroku.com/articles/language-runtime-metrics-ruby and then tried to run the command heroku run console and it was triggering command not found error then I have reverted my changes and it started working.我遵循了为Ruby Language Metrics https://devcenter.heroku.com/articles/language-runtime-metrics-ruby提供的配置,然后尝试运行命令heroku run console并且它触发了command not found error然后我有恢复了我的更改并开始工作。

Hope this will be helpful!希望这会有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM