我无法在Heroku中打开我的Rails应用程序,尽管能够推送到heroku?我过去已经设置了Heroku并且已经成功地查看了应用程序,但是这个我正在画一个空白。说实话,我甚至不知道要查看哪些文件。
这里的任何人都可以帮我解决这个问题!我正在研究Nitrous,可以在本地预览应用程序没问题。
heroku logs -t yield:
action@chrome-comet-112003:~/workspace/hootandholla_lp(master)$ heroku logs -t
2015-08-05T10:11:46.113755+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-08-05T10:11:47.163410+00:00 app[web.1]: [2015-08-05 10:11:47] FATAL SignalException: SIGTERM
2015-08-05T10:11:47.163413+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2015-08-05T10:11:47.163416+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2015-08-05T10:11:47.163418+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2015-08-05T10:11:47.163420+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:14:in `run'
2015-08-05T10:11:47.163422+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:264:in `start'
2015-08-05T10:11:47.163423+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2015-08-05T10:11:47.163424+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2015-08-05T10:11:47.163419+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2015-08-05T10:11:47.163428+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2015-08-05T10:11:47.163426+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
2015-08-05T10:11:47.163427+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
2015-08-05T10:11:47.163429+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-08-05T10:11:47.182568+00:00 app[web.1]: [2015-08-05 10:11:47] INFO going to shutdown ...
2015-08-05T10:11:47.182661+00:00 app[web.1]: [2015-08-05 10:11:47] INFO WEBrick::HTTPServer#start done.
2015-08-05T10:11:47.163431+00:00 app[web.1]: bin/rails:8:in `require'
2015-08-05T10:11:47.163432+00:00 app[web.1]: bin/rails:8:in `<main>'
2015-08-05T10:11:47.193884+00:00 app[web.1]: Exiting
2015-08-05T10:11:50.101489+00:00 heroku[web.1]: Process exited with status 143
2015-08-06T05:34:27.497781+00:00 heroku[api]: Deploy c279b16 by justindavidson23@gmail.com
2015-08-06T05:34:27.497781+00:00 heroku[api]: Release v9 created by justindavidson23@gmail.com
2015-08-06T05:34:27.545639+00:00 heroku[slug-compiler]: Slug compilation started
2015-08-06T05:34:27.545647+00:00 heroku[slug-compiler]: Slug compilation finished
2015-08-06T12:07:05.149371+00:00 heroku[slug-compiler]: Slug compilation started
2015-08-06T12:07:05.149391+00:00 heroku[slug-compiler]: Slug compilation finished
2015-08-06T12:07:05.078014+00:00 heroku[api]: Deploy 9ee6257 by justindavidson23@gmail.com
2015-08-07T04:02:54.198603+00:00 heroku[slug-compiler]: Slug compilation started
2015-08-07T04:02:54.198619+00:00 heroku[slug-compiler]: Slug compilation finished
2015-08-07T04:03:29.349940+00:00 heroku[web.1]: Unidling
2015-08-07T04:03:29.349940+00:00 heroku[web.1]: State changed from down to starting
2015-08-07T04:03:33.183373+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 45764 -e production`
2015-08-07T04:03:37.162005+00:00 app[web.1]: [2015-08-07 04:03:37] INFO WEBrick 1.3.1
2015-08-07T04:03:37.162033+00:00 app[web.1]: [2015-08-07 04:03:37] INFO ruby 2.0.0 (2015-04-13) [x86_64-linux]
2015-08-07T04:03:37.162392+00:00 app[web.1]: [2015-08-07 04:03:37] INFO WEBrick::HTTPServer#start: pid=3 port=45764
2015-08-07T04:03:37.623532+00:00 heroku[web.1]: State changed from starting to up
2015-08-07T04:03:38.563290+00:00 heroku[router]: at=info method=GET path="/" host=nameless-taiga-1654.herokuapp.com request_id=91a31355-2162-4455-9c04-d66194cc2504 fwd="1
44.139.5.98" dyno=web.1 connect=1ms service=128ms status=500 bytes=1754
2015-08-07T04:03:38.442318+00:00 app[web.1]: => Booting WEBrick
2015-08-07T04:03:38.442326+00:00 app[web.1]: => Rails 4.1.0 application starting in production on http://0.0.0.0:45764
2015-08-07T04:03:38.442328+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-08-07T04:03:38.442330+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2015-08-07T04:03:38.442331+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-08-07T04:03:38.442332+00:00 app[web.1]: Started GET "/" for 144.139.5.98 at 2015-08-07 04:03:38 +0000
2015-08-07T04:03:38.535955+00:00 app[web.1]: Processing by ContactsController#new as HTML
2015-08-07T04:03:38.560955+00:00 app[web.1]: ^
2015-08-07T04:03:38.560953+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"contacts"'::regclass
2015-08-07T04:03:38.560959+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2015-08-07T04:03:38.560948+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "contacts" does not exist
2015-08-07T04:03:38.560961+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-08-07T04:03:38.560964+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-08-07T04:03:38.560962+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-08-07T04:03:38.560969+00:00 app[web.1]: ORDER BY a.attnum
2015-08-07T04:03:38.560966+00:00 app[web.1]: WHERE a.attrelid = '"contacts"'::regclass
2015-08-07T04:03:38.560967+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2015-08-07T04:03:38.560971+00:00 app[web.1]:
2015-08-07T04:03:38.561210+00:00 app[web.1]: Completed 500 Internal Server Error in 25ms
2015-08-07T04:03:38.562421+00:00 app[web.1]:
2015-08-07T04:03:38.562424+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "contacts" does not exist
2015-08-07T04:03:38.562425+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"contacts"'::regclass
2015-08-07T04:03:38.562427+00:00 app[web.1]: ^
2015-08-07T04:03:38.562429+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2015-08-07T04:03:38.562431+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2015-08-07T04:03:38.562433+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2015-08-07T04:03:38.562435+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2015-08-07T04:03:38.562436+00:00 app[web.1]: WHERE a.attrelid = '"contacts"'::regclass
2015-08-07T04:03:38.562438+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2015-08-07T04:03:38.562440+00:00 app[web.1]: ORDER BY a.attnum
2015-08-07T04:03:38.562441+00:00 app[web.1]: ):
2015-08-07T04:03:38.562443+00:00 app[web.1]: app/controllers/contacts_controller.rb:3:in `new'
2015-08-07T04:03:38.562444+00:00 app[web.1]:
2015-08-07T04:03:38.562446+00:00 app[web.1]:
2015-08-07T04:03:39.019675+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=nameless-taiga-1654.herokuapp.com request_id=6ba0f50b-9218-4594-bd58-f4ced57f
4e97 fwd="144.139.5.98" dyno=web.1 connect=12ms service=4ms status=200 bytes=228
2015-08-07T04:36:39.135021+00:00 heroku[web.1]: Idling
2015-08-07T04:36:39.135851+00:00 heroku[web.1]: State changed from up to down
2015-08-07T04:36:41.892417+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-08-07T04:36:42.685718+00:00 app[web.1]: [2015-08-07 04:36:42] FATAL SignalException: SIGTERM
2015-08-07T04:36:42.685725+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2015-08-07T04:36:42.685729+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2015-08-07T04:36:42.685730+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2015-08-07T04:36:42.685732+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2015-08-07T04:36:42.685733+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:14:in `run'
2015-08-07T04:36:42.685735+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:264:in `start'
2015-08-07T04:36:42.685736+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2015-08-07T04:36:42.685738+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2015-08-07T04:36:42.685740+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
2015-08-07T04:36:42.685741+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
2015-08-07T04:36:42.685743+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2015-08-07T04:36:42.685744+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-08-07T04:36:42.685746+00:00 app[web.1]: bin/rails:8:in `require'
2015-08-07T04:36:42.685747+00:00 app[web.1]: bin/rails:8:in `<main>'
2015-08-07T04:36:42.685854+00:00 app[web.1]: [2015-08-07 04:36:42] INFO going to shutdown ...
2015-08-07T04:36:42.685950+00:00 app[web.1]: Exiting
2015-08-07T04:36:42.685901+00:00 app[web.1]: [2015-08-07 04:36:42] INFO WEBrick::HTTPServer#start done.
2015-08-07T04:36:43.741848+00:00 heroku[web.1]: Process exited with status 143
谢谢@Pavan Heroku url现在显示主页面(这是一个表单),但是当我输入字段并提交时,功能性不存在,我得到“我们很抱歉,但出了点问题”错误。
任何想法??
heroku open得到了这个:
动作@ chrome-comet-112003:〜/ workspace / hootandholla_lp(master)$ heroku open 打开无名 - taiga-1654 ......失败了 ! Heroku客户端内部错误。 !在以下网址搜索帮助:https://help.heroku.com !或者报告错误:https://github.com/heroku/heroku/issues/new 错误:无法找到浏览器命令。如果这是意外的,请重新运行环境变量LAUNCHY_DEBUG = true或'-d'命令行选项和fil 是https://github.com/copiousfreetime/launchy/issues/new的一个错误(Launchy :: CommandNotFoundError) 命令:heroku打开 版本:heroku-toolbelt / 3.40.9(x86_64-linux)ruby / 2.1.1 错误ID:64b88457d8a247f88a34963a2479eda6 有关/home/action/.heroku/error.log
的更多信息@Pavan,
action @ chrome-comet-112003:〜/ workspace / hootandholla_lp(master)$ heroku run rake db:migrate --app hootandholla_lp
连接到终端的rake db:migrate
运行失败
!找不到应用
以下是在HEROKU收到表格提交错误后的日志
action@chrome-comet-112003:~/workspace/hootandholla_lp(master)$ heroku logs -t
2015-08-07T04:03:38.562446+00:00 app[web.1]:
2015-08-07T04:03:39.019675+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=nameless-taiga-1654.herokuapp.com request_id=6ba0f50b-9218-4594-bd58-f4ced57f
4e97 fwd="144.139.5.98" dyno=web.1 connect=12ms service=4ms status=200 bytes=228
2015-08-07T04:36:39.135021+00:00 heroku[web.1]: Idling
2015-08-07T04:36:39.135851+00:00 heroku[web.1]: State changed from up to down
2015-08-07T04:36:41.892417+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-08-07T04:36:42.685718+00:00 app[web.1]: [2015-08-07 04:36:42] FATAL SignalException: SIGTERM
2015-08-07T04:36:42.685725+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2015-08-07T04:36:42.685729+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2015-08-07T04:36:42.685730+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2015-08-07T04:36:42.685732+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2015-08-07T04:36:42.685733+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:14:in `run'
2015-08-07T04:36:42.685735+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:264:in `start'
2015-08-07T04:36:42.685736+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2015-08-07T04:36:42.685738+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2015-08-07T04:36:42.685740+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
2015-08-07T04:36:42.685741+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
2015-08-07T04:36:42.685743+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2015-08-07T04:36:42.685744+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-08-07T04:36:42.685746+00:00 app[web.1]: bin/rails:8:in `require'
2015-08-07T04:36:42.685747+00:00 app[web.1]: bin/rails:8:in `<main>'
2015-08-07T04:36:42.685854+00:00 app[web.1]: [2015-08-07 04:36:42] INFO going to shutdown ...
2015-08-07T04:36:42.685950+00:00 app[web.1]: Exiting
2015-08-07T04:36:42.685901+00:00 app[web.1]: [2015-08-07 04:36:42] INFO WEBrick::HTTPServer#start done.
2015-08-07T04:36:43.741848+00:00 heroku[web.1]: Process exited with status 143
2015-08-07T05:35:06.842966+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by justindavidson23@gmail.com
2015-08-07T05:35:10.628754+00:00 heroku[run.6076]: Awaiting client
2015-08-07T05:35:10.667373+00:00 heroku[run.6076]: Starting process with command `bundle exec rake db:migrate`
2015-08-07T05:35:10.962380+00:00 heroku[run.6076]: State changed from starting to up
2015-08-07T05:35:17.611000+00:00 heroku[run.6076]: State changed from up to complete
2015-08-07T05:35:17.600075+00:00 heroku[run.6076]: Process exited with status 0
2015-08-07T05:36:43.702464+00:00 heroku[web.1]: Unidling
2015-08-07T05:36:43.702915+00:00 heroku[web.1]: State changed from down to starting
2015-08-07T05:36:47.917903+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 6811 -e production`
2015-08-07T05:36:51.251009+00:00 app[web.1]: [2015-08-07 05:36:51] INFO WEBrick 1.3.1
2015-08-07T05:36:51.251033+00:00 app[web.1]: [2015-08-07 05:36:51] INFO ruby 2.0.0 (2015-04-13) [x86_64-linux]
2015-08-07T05:36:51.251363+00:00 app[web.1]: [2015-08-07 05:36:51] INFO WEBrick::HTTPServer#start: pid=3 port=6811
2015-08-07T05:36:51.654362+00:00 heroku[web.1]: State changed from starting to up
2015-08-07T05:36:52.899661+00:00 app[web.1]: => Booting WEBrick
2015-08-07T05:36:52.899665+00:00 app[web.1]: => Rails 4.1.0 application starting in production on http://0.0.0.0:6811
2015-08-07T05:36:52.899670+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2015-08-07T05:36:52.899667+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-08-07T05:36:52.899671+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-08-07T05:36:52.977383+00:00 app[web.1]: Processing by ContactsController#new as HTML
2015-08-07T05:36:52.899673+00:00 app[web.1]: Started GET "/" for 144.139.5.98 at 2015-08-07 05:36:52 +0000
2015-08-07T05:36:53.020950+00:00 app[web.1]: Completed 200 OK in 43ms (Views: 22.2ms | ActiveRecord: 8.9ms)
2015-08-07T05:36:53.038490+00:00 heroku[router]: at=info method=GET path="/" host=nameless-taiga-1654.herokuapp.com request_id=6111d154-4b9b-4dac-a140-1ade62597af9 fwd="1
44.139.5.98" dyno=web.1 connect=1ms service=140ms status=200 bytes=2812
2015-08-07T05:36:53.019264+00:00 app[web.1]: Rendered contacts/new.html.erb within layouts/application (18.7ms)
2015-08-07T05:36:53.435723+00:00 heroku[router]: at=info method=GET path="/assets/application-6dd87b44a2480dd4709ceeeae52df052.css" host=nameless-taiga-1654.herokuapp.com
request_id=e464d2b6-3e3d-40e1-bbcf-eb19006842af fwd="144.139.5.98" dyno=web.1 connect=2ms service=53ms status=200 bytes=125751
2015-08-07T05:36:53.661747+00:00 heroku[router]: at=info method=GET path="/assets/application-4f80d6744f4d98bda40010745bd45a63.js" host=nameless-taiga-1654.herokuapp.com
request_id=bf96090c-00c0-4247-9c3c-90de0c482f1e fwd="144.139.5.98" dyno=web.1 connect=1ms service=11ms status=200 bytes=153448
2015-08-07T05:36:55.242136+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=nameless-taiga-1654.herokuapp.com request_id=772646ba-4f40-495b-ba01-bb91c7ac
8dfa fwd="144.139.5.98" dyno=web.1 connect=2ms service=4ms status=304 bytes=133
2015-08-07T05:37:05.507033+00:00 heroku[router]: at=info method=POST path="/contacts" host=nameless-taiga-1654.herokuapp.com request_id=1be432fc-1c7f-4eea-bffa-1a69b3d697
07 fwd="144.139.5.98" dyno=web.1 connect=4ms service=51ms status=500 bytes=1754
2015-08-07T05:37:05.460567+00:00 app[web.1]: Processing by ContactsController#create as HTML
2015-08-07T05:37:05.460629+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Z2Qh/GDIycId0uJk2evhblbKisGXNlIzjtz+xfJoyac=", "contact"=>{"name"=>"asdfas
d", "phone"=>"asdf", "email"=>"asdf@gmail.com", "event_type"=>"asdf", "comments"=>"asdf"}, "commit"=>"Submit"}
2015-08-07T05:37:05.483852+00:00 app[web.1]: Rendered contact_mailer/contact_email.html.erb (0.6ms)
2015-08-07T05:37:05.498972+00:00 app[web.1]:
2015-08-07T05:37:05.498974+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2015-08-07T05:37:05.498976+00:00 app[web.1]: app/mailers/contact_mailer.rb:8:in `contact_email'
2015-08-07T05:37:05.498978+00:00 app[web.1]: app/controllers/contacts_controller.rb:9:in `create'
2015-08-07T05:37:05.498977+00:00 app[web.1]: app/models/contact.rb:7:in `send_email'
2015-08-07T05:37:05.498980+00:00 app[web.1]:
2015-08-07T05:37:05.498981+00:00 app[web.1]:
2015-08-07T05:37:05.457898+00:00 app[web.1]: Started POST "/contacts" for 144.139.5.98 at 2015-08-07 05:37:05 +0000
2015-08-07T05:37:05.495367+00:00 app[web.1]:
2015-08-07T05:37:05.497483+00:00 app[web.1]: Completed 500 Internal Server Error in 37ms
2015-08-07T05:37:05.495371+00:00 app[web.1]: Sent mail to justindavidson23@gmail.com (9.4ms)
2015-08-07T05:43:51.796064+00:00 heroku[router]: at=info method=POST path="/contacts" host=nameless-taiga-1654.herokuapp.com request_id=8344cbe5-537e-4d8a-9bff-9422d8fe8c
76 fwd="144.139.5.98" dyno=web.1 connect=0ms service=28ms status=500 bytes=1754
2015-08-07T05:43:51.770989+00:00 app[web.1]: Processing by ContactsController#create as HTML
2015-08-07T05:43:51.771040+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Z2Qh/GDIycId0uJk2evhblbKisGXNlIzjtz+xfJoyac=", "contact"=>{"name"=>"asdfas
d", "phone"=>"asdf", "email"=>"asdf@gmail.com", "event_type"=>"asdf", "comments"=>"asdf"}, "commit"=>"Submit"}
2015-08-07T05:43:51.781070+00:00 app[web.1]: Rendered contact_mailer/contact_email.html.erb (0.1ms)
2015-08-07T05:43:51.792253+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2015-08-07T05:43:51.792251+00:00 app[web.1]:
2015-08-07T05:43:51.792255+00:00 app[web.1]: app/mailers/contact_mailer.rb:8:in `contact_email'
2015-08-07T05:43:51.792256+00:00 app[web.1]: app/models/contact.rb:7:in `send_email'
2015-08-07T05:43:51.768324+00:00 app[web.1]: Started POST "/contacts" for 144.139.5.98 at 2015-08-07 05:43:51 +0000
2015-08-07T05:43:51.792257+00:00 app[web.1]: app/controllers/contacts_controller.rb:9:in `create'
2015-08-07T05:43:51.792260+00:00 app[web.1]:
2015-08-07T05:43:51.789451+00:00 app[web.1]:
2015-08-07T05:43:51.792259+00:00 app[web.1]:
2015-08-07T05:43:51.789454+00:00 app[web.1]: Sent mail to justindavidson23@gmail.com (6.8ms)
2015-08-07T05:43:51.790784+00:00 app[web.1]: Completed 500 Internal Server Error in 20ms
2015-08-07T05:43:52.221875+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=nameless-taiga-1654.herokuapp.com request_id=cac3997f-3e24-41b7-90e8-fe8c6d11
c405 fwd="144.139.5.98" dyno=web.1 connect=0ms service=3ms status=200 bytes=228
2015-08-07T05:43:57.576134+00:00 heroku[router]: at=info method=GET path="/" host=nameless-taiga-1654.herokuapp.com request_id=1c19bab7-a927-408c-a603-19bb73684a2a fwd="1
44.139.5.98" dyno=web.1 connect=0ms service=12ms status=304 bytes=738
2015-08-07T05:43:57.563828+00:00 app[web.1]: Started GET "/" for 144.139.5.98 at 2015-08-07 05:43:57 +0000
2015-08-07T05:43:57.566209+00:00 app[web.1]: Processing by ContactsController#new as HTML
2015-08-07T05:43:57.571393+00:00 app[web.1]: Rendered contacts/new.html.erb within layouts/application (3.8ms)
2015-08-07T05:43:57.572163+00:00 app[web.1]: Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms)
2015-08-07T05:44:05.714357+00:00 heroku[router]: at=info method=POST path="/contacts" host=nameless-taiga-1654.herokuapp.com request_id=78ab7efb-59c5-40cc-b304-367f2e8a9b
ff fwd="144.139.5.98" dyno=web.1 connect=3ms service=27ms status=500 bytes=1754
2015-08-07T05:44:05.686472+00:00 app[web.1]: Started POST "/contacts" for 144.139.5.98 at 2015-08-07 05:44:05 +0000
2015-08-07T05:44:05.706925+00:00 app[web.1]:
2015-08-07T05:44:05.706928+00:00 app[web.1]: Sent mail to justindavidson23@gmail.com (6.8ms)
2015-08-07T05:44:05.708208+00:00 app[web.1]: Completed 500 Internal Server Error in 19ms
2015-08-07T05:44:05.688638+00:00 app[web.1]: Processing by ContactsController#create as HTML
2015-08-07T05:44:05.688704+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Z2Qh/GDIycId0uJk2evhblbKisGXNlIzjtz+xfJoyac=", "contact"=>{"name"=>"sasdf"
, "phone"=>"asdf", "email"=>"asd@gmail.com", "event_type"=>"adsf", "comments"=>"asdf"}, "commit"=>"Submit"}
2015-08-07T05:44:05.698623+00:00 app[web.1]: Rendered contact_mailer/contact_email.html.erb (0.1ms)
2015-08-07T05:44:05.709746+00:00 app[web.1]:
2015-08-07T05:44:05.709748+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2015-08-07T05:44:05.709749+00:00 app[web.1]: app/mailers/contact_mailer.rb:8:in `contact_email'
2015-08-07T05:44:05.709751+00:00 app[web.1]: app/models/contact.rb:7:in `send_email'
2015-08-07T05:44:05.709752+00:00 app[web.1]: app/controllers/contacts_controller.rb:9:in `create'
2015-08-07T05:44:05.709753+00:00 app[web.1]:
2015-08-07T05:44:05.709755+00:00 app[web.1]:
应用程序/邮寄者/ contact_mailer.rb
class ContactMailer < ActionMailer::Base
default to: 'justindavidson23@gmail.com'
def contact_email(contact)
@contact = contact
mail(from: @contact.email, subject: 'Contact Form Message').deliver
end
end
应用程序/模型/ contact.rb
class Contact < ActiveRecord::Base
validates :name, :email, presence: true
after_create :send_email
private
def send_email
ContactMailer.contact_email(self).deliver
end
end
答案 0 :(得分:1)
ActiveRecord :: StatementInvalid(PG :: UndefinedTable:ERROR:relation “联系人”不存在
尝试运行以下命令
heroku run rake db:migrate