2
5

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 5 years have passed since last update.

Herokuにポートフォリをデプロイする

Posted at

#初めに
Heroku初心者がHerokuでポートフォリオをデプロイ出来ればと思いまして書きます。

メモ的に書きますので、参考になる方がいればと思います。

#Heroku登録
まずはHerokuに登録しましょう。

#heroku toolbeltインストール
次にこちらをインストール
自分の環境にあったものをインストールしましょう。

#アカウント認証

$ heroku login
Enter your Heroku credentials.
Email: adam@example.com
Password (typing will be hidden):
Authentication successful.

EmailとPasswordには先ほど登録したものを入力する。

#Gitリポジトリ
作成しているポートフォリオにGitリポジトリがなければ作成しておきましょう。
Herokuでは、アプリケーションごとにGitを使ってリモートリポジトリへプッシュする必要があるので、リポジトリを作成し、追加、コミットします。

$ git init
$ git add 
$ git commit -m "hogehoge"

#Herokuにアプリ作成
Herokuに新しいアプリケーションを作成しましょう。

$ heroku create
Creating app... done, stack is cedar-14
https://xxxxxxxxxx.herokuapp.com/ | https://git.heroku.com/xxxxxxxxxx.git

#ポートフォリオをデプロイ

$ git push heroku master
Counting objects: 4, done.

〜 略 〜

remote: Verifying deploy... done.
To https://git.heroku.com/xxxxxxxxxxxxxxx.git
 * [new branch]      master -> master

#アプリをブラウザで確認

$ heroku open

#DBをmigrateやseedを行う場合

$ heroku run rails db:migrate
$ heroku run rails db:seed

#エラーが出てlogやconsoleを確認したい時

$ heroku logs -t
$ heroku run rails console

#終わりに
何かしら困っている方に少しでも参考になればと思います。

2
5
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
2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?