1
0

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

rails チュートリアル 第二章でのデプロイできないことへの対処法

Last updated at Posted at 2021-02-18

第2章でデプロイを行おうとしたがうまくいかず時間がかかってしまいました。
その時の対処法を記します。

状態

「2.3.5 アプリケーションをデプロイする」

デプロイを行うため、以下の入力を実施した


$ git add -A
$ git commit -m "Finish toy app"
$ git push
$ heroku create
$ git push heroku master

作成されたアプリをデプロイする際、以下のエラーが出る。


remote: ###### WARNING:
remote: 
remote:        You have not declared a Ruby version in your Gemfile.
remote:        
remote:        To declare a Ruby version add this line to your Gemfile:
remote:        
remote:        ```
remote:        ruby "2.6.6"
remote:        ```
remote:        
remote:        For more information see:
remote:          https://devcenter.heroku.com/articles/ruby-versions
remote: 
remote: ###### WARNING:
remote: 
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        
remote: 
remote: 

対処法

以下を入力


$ heroku run rails db:migrate

その後、もう一度デプロイする手順を踏めばうまくいきました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?