Heroku部署失败

时间:2017-10-10 03:49:16

标签: ruby-on-rails git heroku

我尝试在Heroku上部署我的简单rails应用程序 (deployment logs)但我得到了错误:

Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.

我一步一步地做了:

  1. git init
  2. heroku create
  3. git commit -am ".."
  4. git push heroku master
  5. 日志表示已建立连接但未显示应用程序。知道哪里出错了吗?

      Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> console, rake, web, worker
       Compressing...
       Done: 37.3M
       Launching...
       Released v5
       https://coursecatalog2.herokuapp.com/ deployed to Heroku
    

2 个答案:

答案 0 :(得分:0)

你检查过生产组的宝石吗? 你有pg gem吗? 你有任何待定的迁移吗? 首先检查这些,如果您的数据库全部设置,请尝试使用终端进行迁移,如果您正在使用heroku CLI

 heroku run rake db:migrate

或从应用程序仪表板中的控制台

答案 1 :(得分:0)

的Gemfile!

group :development do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
end