LoginSignup
1
0

More than 5 years have passed since last update.

小さなRailsアプリをHerokuにデプロイするメモ

Last updated at Posted at 2018-04-18

前提

  • railsはgemでインストール済(アプリはこれから)
  • herokuアカウント作成済み、heroku cliインストール済、ログイン済み

メモ

Railsアプリ作成

デフォルトのまま作成する

$ rails new herokusample -d postgresql
$ vim public/index.html ★

★public/index.htmlじゃなくてもFQDNでアクセスしたときに表示されるページがあればいいはずであるが、こういったものが無いと下記画像のようなエラーが出る

FireShot Capture 10 - The page you were looking for d_ - https___obscure-cliffs-87417.herokuapp.com_.png

デプロイ

% git init
% git add .
% git commit -m "first"
% heroku create xxxxx
★この時点で.git/configのリモートリポジトリに[heroku]が追加される。Heroku上にアプリが作られる。
% git push heroku master

参考

railsのherokuへの展開でつまずいた話 - saj_kzの日記 http://saj-kz.hatenablog.com/entry/2014/04/06/231941

1
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
1
0