LoginSignup
0
0

More than 5 years have passed since last update.

herokuでcloud9から簡単デプロイ

Posted at

まずは、herokuをインストール(https://signup.heroku.com/identity)

cd
sudo vi .profile

次にiを入力することにより入力画面へ移ります

PATH="/usr/local/heroku/bin:$PATH"
export PATH

記述が終わったら、「esc」キーを押してから「:wq」で保存します

 source ~/.profile

heroku toolbeltのアップデート

 sudo wget -qO- https://toolbelt.heroku.com/install.sh | sh 

続いて、herokuにログインします。

cd ~/environment/アプリ名
heroku login

続いてrailsのgemfileでの設定

 group :production do
  gem 'rails_12factor'
end

インストール

bundle install

herokuの作成

git init
heroku create

urlにアクセスしてみましょう!

gitの設定

git add .

gitの変更をコミット

git commit -m "update for upload to heroku"

デプロイをする

git push heroku master

DBを作る

heroku run rake db:migrate
0
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
0
0