17
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

インストールしたはずのherokuが毎回消えるのはなぜ?

Last updated at Posted at 2019-11-04

問題点

以下のコマンド(Railsチュートリアル1章参照)でherokuをcloud9にインストールしたはずが、

$ source <(curl -sL https://cdn.learnenough.com/heroku_install)

再びcloud9を立ち上げると、

$ heroku --version
bash: heroku: command not found

と表示される。(あれ?インストールしたはずなのに)

解決策

毎回一番上のコマンドでherokuを再インストールしても良いが、それは些か面倒臭い。

ターミナルでvi ~/.bashrcを実行し、一番下の行に

source $HOME/.profile > /dev/null

を追加し、保存(escを押してから:wqを入力してエンター)したら、ターミナルで

$ source ~/.bashrc

を実行。再びheroku --versionを実行したら、

$ heroku/7.33.3 linux-x64 node-v11.14.0

と無事herokuがインストール済みであることが確認できた。
(sourceはbashrcの変更を反映するコマンドなのだそうです。これで毎回herokuをインストールする手間が省けます。)

17
8
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
17
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?