【发布时间】:2021-02-01 23:42:05
【问题描述】:
我是 Rails 新手,我一直在尝试在 Heroku 上进行部署——我已经开始开发一个可以在本地正常运行的应用程序 (https://github.com/axfelix/ffmpegOnIce),为此我已经完成了各种必要的准备工作使其在 Heroku 上正常运行的任务(添加了一个 buildpack,添加了一个生产数据库配置以使用 postgres 而不是 SQLite,编写了一个 procfile 以确保它使用 puma),并且......它似乎什么都不做。
heroku ps 报错:
$ heroku ps -a ffmpeg-on-ice
Free dyno hours quota remaining this month: 1000h 0m (100%)
Free dyno usage for this app: 0h 0m (0%)
For more information on dyno sleeping and how to upgrade, see:
https://devcenter.heroku.com/articles/dyno-sleeping
=== web (Free): bundle exec puma -C config/puma.rb (1)
web.1: up 2021/02/01 15:28:39 -0800 (~ 5m ago)
但尝试加载 https://ffmpeg-on-ice.herokuapp.com/ 只会导致“我们很抱歉,但出了点问题。如果您是应用程序所有者,请查看日志以获取更多信息。”
我得到的一个线索是,数据库似乎没有在 Heroku 上正确初始化,就像我做 heroku run rake db:migrate -a ffmpeg-on-ice 时一样,我遇到“无法连接到服务器”的问题。但我不确定这里还需要发生什么才能让它工作,而 Heroku 日志只显示了一堆 GET。我只是没有在正确的端口上运行应用程序吗?
(这是一个新的 Ruby 3 / Rails 6 项目)
谢谢!
【问题讨论】:
标签: ruby-on-rails heroku