heroku toolbeltでmacに上手くインストールできない時
Railsチュートリアル、「1.4.1 Herokuのセットアップ」で躓きました。
単純に
Heroku Toolbelt
ここからmac版をダウンロードしてインストールしたのにそのあと、
$ heroku --version
を打つと、
rbenv: heroku: command not found The `heroku' command exists in these Ruby versions: 1.9.3-p194
とhetokuコマンドが使えない?
調べてみると、
"rbenvを使っていて、他のrubyのバージョンでもheroku gemを使っていた場合は"
このような表示がでると。
なので、
今Railsチュートリアルでやりたいのはruby 2.0.0だからこの1.9.3-p194のherokuはアンインストールする必要があると。
そういえば以前の学習時に1.9.3ぐらいでherokuを一度使っていたからそれがインストールされていたんだ・・・。
ってことで
表示されていたそれぞれのRubyのバージョンでgen uninnstallをする
$ rbenv shell 1.9.3-p194 $ gem uninstall heroku
この状態でもう1度heroku toolbeltをインストールしてみる。
そうしてターミナルを再起動する。
もう1回、
$ heroku --version
すると
Your version of git is 1.7.10.2. Which has serious security vulnerabilities. More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x heroku-toolbelt/3.37.0 (x86_64-darwin10.8.0) ruby/1.9.3 You have no installed plugins. updating Heroku CLI...done. Updated to 3.37.1
となるけど、
「heroku-toolbelt/3.37.1 (x86_64-darwin10.8.0) ruby/1.9.3」
古い方に入ってないかこれ!?
でも同じようにこれを見るとgithub.com
グローバルバージョンが2.0.0でもこれでいいみたいなこと書いてる。
特に互換性があるわけではないみたいなのでこれでいいのかな?
heroku toolbeltのアンインストール
$ rm -rf /usr/local/heroku $ rm -rf ~/.heroku