LoginSignup
0
0

More than 3 years have passed since last update.

cloud9でherokuのコマンドが使えない

Last updated at Posted at 2020-03-03

Heroku -v
をしたところ、
command not found
が出る。

nvm install node
npm install -g heroku-cli
を試す。

再度
heroku -v
を行うと、
› Warning: heroku-cli update available from 7.0.9 to 7.39.0.
heroku-cli/7.0.9 linux-x64 node-v13.9.0

と出るので、
heroku update
を行うと
heroku-cli: Updating CLI... not updatable
と出た。

https://tanarizm.com/cloud9_heroku_command_notfound
こちらの記事に従って
source <(curl -sL https://cdn.learnenough.com/heroku_install)
を実行。
Heroku -v
はできた。

Heroku をブラウザで開くと
Application error
が出現。

heroku logs
でエラーの内容を確認し、修正、デプロイ。
すると
"We're sorry, but something went wrong."
エラーが出た。

https://teratail.com/questions/124183
こちらの記事を参考に
heroku run rake db:version

heroku run rake db:migrate
を行うと、herokuは動いた。

結論:
・バリデーションのコードミス
・heroku run rake db:migrateをしていなかった。

追記
・3時間後に作業を行ったところ、またherokuのコマンドが使用できなくなった。
 同じ手順を踏み、解決。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0