Prelaunchr App 在开发中通过工头进行部署,但在部署到 heroku 时不起作用

Prelaunchr App deploys through foreman in development but doesn't work when deployed to heroku

我从 wardpenney 克隆了更新后的 Harry's prelaunchr 网站,谢天谢地,他将其更新为 rails 4.2 和 ruby 2.2.0。

https://github.com/wardpenney/prelaunchr/tree/master

我没有做任何更改,只是想看看它是否有效,当我启动工头时,该网站已经启动并且 运行 没有问题。

然而,当我将它部署到 Heroku 时,我得到了

We're sorry, but something went wrong.

我一直在绞尽脑汁思考问题可能是什么,但就是无法理解日志文件。

请注意,我一直在通过 cloud9 IDE 开发此应用程序,因为 windows 没有安装 Rails 4.2 和 ruby 2.2 的可靠方法。 0.

感谢阅读并感谢您能给我的任何帮助!

2015-09-02T04:11:26.451915+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-09-02T04:11:26.451917+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-09-02T04:11:26.451918+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-09-02T04:11:26.451920+00:00 app[web.1]:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:11:26.451921+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2015-09-02T04:11:26.451922+00:00 app[web.1]:                ORDER BY a.attnum
2015-09-02T04:11:26.451924+00:00 app[web.1]: 
2015-09-02T04:11:26.452726+00:00 app[web.1]: Completed 500 Internal Server Error in 25ms
2015-09-02T04:11:26.456354+00:00 heroku[router]: at=info method=GET path="/" host=assistprelaunchr.herokuapp.com request_id=5c2f9062-9685-48ca-98f4-6c069e74f479 fwd="94.205.135.161" dyno=web.1 connect=1ms service=118ms status=500 bytes=906
2015-09-02T04:11:26.427369+00:00 app[web.1]: Processing by UsersController#new as HTML
2015-09-02T04:11:26.455914+00:00 app[web.1]: 
2015-09-02T04:11:26.455918+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "users" does not exist
2015-09-02T04:11:26.455921+00:00 app[web.1]:                                           ^
2015-09-02T04:11:26.455920+00:00 app[web.1]: LINE 5:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:11:26.455923+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2015-09-02T04:11:26.455929+00:00 app[web.1]:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:11:26.455930+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2015-09-02T04:11:26.455933+00:00 app[web.1]: ):
2015-09-02T04:11:26.455925+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-09-02T04:11:26.455927+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-09-02T04:11:26.455932+00:00 app[web.1]:                ORDER BY a.attnum
2015-09-02T04:11:26.455935+00:00 app[web.1]:   app/controllers/users_controller.rb:8:in `new'
2015-09-02T04:11:26.455926+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-09-02T04:11:26.455937+00:00 app[web.1]: 
2015-09-02T04:11:26.455936+00:00 app[web.1]: 
2015-09-02T04:11:26.549241+00:00 heroku[mailcatcher.1]: Starting process with command `mailcatcher -f`
2015-09-02T04:11:27.228922+00:00 heroku[mailcatcher.1]: State changed from starting to up
2015-09-02T04:11:27.895004+00:00 app[mailcatcher.1]: bash: mailcatcher: command not found
2015-09-02T04:11:28.554909+00:00 heroku[mailcatcher.1]: Process exited with status 127
2015-09-02T04:11:28.565470+00:00 heroku[mailcatcher.1]: State changed from up to crashed
2015-09-02T04:19:32.033503+00:00 heroku[api]: Deploy fffb014 by mjomaa@gmail.com
2015-09-02T04:19:32.033646+00:00 heroku[api]: Release v7 created by mjomaa@gmail.com
2015-09-02T04:19:32.097747+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-02T04:19:32.097769+00:00 heroku[slug-compiler]: Slug compilation finished
2015-09-02T04:19:32.592055+00:00 heroku[mailcatcher.1]: State changed from crashed to starting
2015-09-02T04:19:33.016644+00:00 heroku[web.1]: State changed from up to starting
2015-09-02T04:19:35.832157+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-09-02T04:19:36.272334+00:00 app[web.1]: Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT
2015-09-02T04:19:36.272338+00:00 app[web.1]: Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT
2015-09-02T04:19:36.278650+00:00 app[web.1]: Unicorn master intercepting TERM and sending myself QUIT instead
2015-09-02T04:19:36.282717+00:00 app[web.1]: Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT
2015-09-02T04:19:36.878952+00:00 app[web.1]: I, [2015-09-02T04:19:36.878786 #3]  INFO -- : reaped #<Process::Status: pid 9 exit 0> worker=1
2015-09-02T04:19:36.879464+00:00 app[web.1]: I, [2015-09-02T04:19:36.879327 #3]  INFO -- : master complete
2015-09-02T04:19:36.878666+00:00 app[web.1]: I, [2015-09-02T04:19:36.878497 #3]  INFO -- : reaped #<Process::Status: pid 6 exit 0> worker=0
2015-09-02T04:19:36.879214+00:00 app[web.1]: I, [2015-09-02T04:19:36.879161 #3]  INFO -- : reaped #<Process::Status: pid 12 exit 0> worker=2
2015-09-02T04:19:37.906516+00:00 heroku[web.1]: Process exited with status 0
2015-09-02T04:19:41.102811+00:00 heroku[mailcatcher.1]: Starting process with command `mailcatcher -f`
2015-09-02T04:19:41.709173+00:00 heroku[mailcatcher.1]: State changed from starting to up
2015-09-02T04:19:43.093473+00:00 heroku[mailcatcher.1]: Process exited with status 127
2015-09-02T04:19:43.101552+00:00 heroku[mailcatcher.1]: State changed from up to crashed
2015-09-02T04:19:42.349322+00:00 app[mailcatcher.1]: bash: mailcatcher: command not found
2015-09-02T04:19:46.299263+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 6500`
2015-09-02T04:19:48.782583+00:00 heroku[web.1]: State changed from starting to up
2015-09-02T04:19:48.554040+00:00 app[web.1]: I, [2015-09-02T04:19:48.553900 #3]  INFO -- : listening on addr=0.0.0.0:6500 fd=9
2015-09-02T04:19:48.554135+00:00 app[web.1]: I, [2015-09-02T04:19:48.554081 #3]  INFO -- : worker=0 spawning...
2015-09-02T04:19:48.561161+00:00 app[web.1]: I, [2015-09-02T04:19:48.560987 #3]  INFO -- : master process ready
2015-09-02T04:19:48.563933+00:00 app[web.1]: I, [2015-09-02T04:19:48.563501 #6]  INFO -- : worker=0 spawned pid=6
2015-09-02T04:19:48.564057+00:00 app[web.1]: I, [2015-09-02T04:19:48.564006 #6]  INFO -- : Refreshing Gem list
2015-09-02T04:19:50.403037+00:00 app[web.1]: DEPRECATION WARNING: You did not specify a `log_level` in `production.rb`. Currently, the default value for `log_level` is `:info` for the production environment and `:debug` in all other environments. In Rails 5 the default value will be unified to `:debug` across all environments. To preserve the current setting, add the following line to your `production.rb`:
2015-09-02T04:19:50.403045+00:00 app[web.1]: 
2015-09-02T04:19:50.403047+00:00 app[web.1]:    config.log_level = :info
2015-09-02T04:19:50.403048+00:00 app[web.1]: 
2015-09-02T04:19:50.403050+00:00 app[web.1]: . (called from block in tsort_each at /app/vendor/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226)
2015-09-02T04:19:51.228920+00:00 heroku[router]: at=info method=GET path="/" host=assistprelaunchr.herokuapp.com request_id=e80ef01e-1e33-4ea0-86ed-39c29b2263fe fwd="94.205.135.161" dyno=web.1 connect=1ms service=742ms status=500 bytes=906
2015-09-02T04:19:51.153047+00:00 app[web.1]: Started GET "/" for 94.205.135.161 at 2015-09-02 04:19:51 +0000
2015-09-02T04:19:51.217703+00:00 app[web.1]: LINE 5:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:19:51.217700+00:00 app[web.1]: PG::UndefinedTable: ERROR:  relation "users" does not exist
2015-09-02T04:19:51.217705+00:00 app[web.1]:                                           ^
2015-09-02T04:19:51.217707+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2015-09-02T04:19:51.217708+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-09-02T04:19:51.217710+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-09-02T04:19:51.217711+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-09-02T04:19:51.217713+00:00 app[web.1]:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:19:51.217716+00:00 app[web.1]:                ORDER BY a.attnum
2015-09-02T04:19:51.217714+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2015-09-02T04:19:51.217717+00:00 app[web.1]: 
2015-09-02T04:19:51.217946+00:00 app[web.1]: Completed 500 Internal Server Error in 12ms
2015-09-02T04:19:51.219073+00:00 app[web.1]: 
2015-09-02T04:19:51.219075+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "users" does not exist
2015-09-02T04:19:51.219077+00:00 app[web.1]: LINE 5:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:19:51.219078+00:00 app[web.1]:                                           ^
2015-09-02T04:19:51.219080+00:00 app[web.1]: :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2015-09-02T04:19:51.219081+00:00 app[web.1]:                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-09-02T04:19:51.219084+00:00 app[web.1]:                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-09-02T04:19:51.219085+00:00 app[web.1]:                WHERE a.attrelid = '"users"'::regclass
2015-09-02T04:19:51.219082+00:00 app[web.1]:                 FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-09-02T04:19:51.219089+00:00 app[web.1]: ):
2015-09-02T04:19:51.219088+00:00 app[web.1]:                ORDER BY a.attnum
2015-09-02T04:19:51.219087+00:00 app[web.1]:                  AND a.attnum > 0 AND NOT a.attisdropped
2015-09-02T04:19:51.219091+00:00 app[web.1]:   app/controllers/users_controller.rb:8:in `new'
2015-09-02T04:19:51.219092+00:00 app[web.1]: 
2015-09-02T04:19:51.219093+00:00 app[web.1]: 
2015-09-02T04:19:51.150682+00:00 app[web.1]: I, [2015-09-02T04:19:51.150568 #6]  INFO -- : worker=0 ready
2015-09-02T04:19:51.205884+00:00 app[web.1]: Processing by UsersController#new as HTML
2015-09-02T04:19:51.703515+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=assistprelaunchr.herokuapp.com request_id=1882ea9d-3791-4fb3-9641-cb45fb182083 fwd="94.205.135.161" dyno=web.1 connect=0ms service=2ms status=200 bytes=1367
2015-09-02T04:23:26.650172+00:00 heroku[mailcatcher.1]: State changed from crashed to starting
2015-09-02T04:23:41.362840+00:00 heroku[mailcatcher.1]: Starting process with command `mailcatcher -f`
2015-09-02T04:23:42.043598+00:00 heroku[mailcatcher.1]: State changed from starting to up
2015-09-02T04:23:43.422698+00:00 app[mailcatcher.1]: bash: mailcatcher: command not found
2015-09-02T04:23:44.388696+00:00 heroku[mailcatcher.1]: State changed from up to crashed
2015-09-02T04:23:44.368015+00:00 heroku[mailcatcher.1]: Process exited with status 127

编辑:

在Heroku中迁移然后重启服务器解决问题![​​=13=]

你好像没有运行数据库迁移,请你在运行迁移后试试

heroku run rake db:migrate

您可能需要重新启动 heroku 服务器。