LoginSignup
2
1

More than 5 years have passed since last update.

herokuにデプロイできない時

Posted at

herokuにpushしたらrejectされた

以下エラー内容

remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected

$ heroku create した直後に、以下のコマンドでnodejsを使えるようにする。
(bootstrapとかをインストールした時、node_modulが作成されるから)

$ heroku buildpacks:set heroku/nodejs

$ heroku buildpacks:add --index 2 heroku/ruby

んで、pushして 

$ heroku run rails db:migrate 

を忘れない

DB関係のエラーが出た時の最終手段

$ heroku buildpacks:set heroku/nodejs

$ heroku buildpacks:add --index 2 heroku/ruby

これすると、heroku上のDBがリセットされる

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