Heroku
db
heroku pg:reset DATABASE_URL
heroku run rake db:migrate
or
heroku run rake db:seed
【Rails】Heroku上でApplication Error(H10 App crashed)【PostgreSQL】
group :production do
gem 'pg', '0.20.0'
end
メモ
heroku run rails c
でheroku上のdbの中身を確認できる。
heroku run rails db:migrate:status
でdbの状態を見れる。
heroku pg:psql -c "select * from posts;"
でも同様のことができる
heroku logs -t
で詳しいエラー内容を見れる。
assets
Rails4 asset pipeline関連設定まとめ(Heroku対応込)
RAILS_ENV=production bundle exec rake assets:precompile assets:clean
git add .
git commit -m "hoge"
git push origin hoge
git push heroku
【rails】【heroku】【bootstrap】herokuでCSS、font、JavaScriptが反映されない。
credentials.yml.enc, master.key
【Rails5.2】credentials.yml.encとmaster.keyでのデプロイによる今までとの変更点
EDITOR=vim bin/rails credentials:edit
railsのエラー「Errno::EACCES: Permission denied」の解決
production環境でsecret_tokenをセットする(rails)