Hitsuji_monのブログ~ 村上春樹のあれ ~

文学好きな組み込み系エンジニア

【#100DaysOfCode】Web本棚の制作 ~2~

Vagrant環境で, herokuへアプリをアップロードするには

  • herokuの環境が必要
  • herokuパッケージのインストールには, sudoの設定とかbinの設定しなきゃ

ということで忘れそうなので、こちら。

qiita.com

blog.tokoyax.com

Vagrantからherokuにログインする
ちょっとハマったので。

  • ターミナルから heroku コマンドを使えるようにする。
    • yum ではインストールできないので、wget で取得します。[必要なかった:取得の際、--no-check-certificate を使用しないとエラーとなるようです。

(SSL通信の証明書の認証をしないオプションをつける)]

$ sudo wget -qO- https://toolbelt.heroku.com/install.sh --no-check-certificate | sh

This script requires superuser access to install software.
You will be prompted for your password by sudo.
Add the Heroku CLI to your PATH using:
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile
  • herokuコマンドへパスを通す
$ vi ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
# heroku のパスを追加
PATH=/usr/local/heroku/bin:$PATH

export PATH
  • profileをリロード
$ source ~/.bash_profile
  • バージョン確認
$ heroku --version
heroku-toolbelt/3.28.2 (x86_64-linux) ruby/2.2.0
You have no installed plugins.
  • herokuにログイン
$ heroku login

Enter your Heroku credentials.
Email: your@email.com
Password (typing will be hidden):
Authentication successful.

cannnot open browserと出て、vagrantの仮想環境からだと、ブラウザを開けなかった.
heroku CLIのURLがメッセージに表示されているので、それをブラウザにコピペ。
別窓でログインしたら、無事成功

herokuアプリの作成・削除

herokuにアプリをすでに5個作ってしまっていて、「消してね」というメッセージが出たので

qiita.com

  • 初めてherokuにアップしてrejectされた時

qiita.com

  • Vagrant + CentOS6.5 で Heroku コマンドインストール

blog.tokoyax.com


herokuへのデプロイ時のエラー。herokuにはSQLite3はない

qiita.com



アイディアbot動いたああああああ、感動!!!
プログラミングのやる気が復活してきた。
コードも理解する気になってきたぞ