该应用程序在我的本地Ubuntu 14.04机器上完美工作,但是当我将其部署到Heroku时,我的应用程序应该在页面上出现应用程序错误已经开始。我运行'heroku日志',但无法确定具体问题是什么。以下是我的日志以及我的Gem文件。任何帮助将不胜感激。
这是我的记录
$ c> 2014-07-23T07:01:02.819470 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies .rb:241:`load' 2014-07-23T07:01:02.819467 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/activesupport -4.1.4 / lib / active_support / dependencies.rb:241:在`block in load'中 2014-07-23T07:01:02.819544 + 00:00 app [web.1]:from / app / vendor /ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in`block in each_strongly_connected_component' 2014-07-23T07:01:02.819471 + 00:00 app [web.1] :从/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:648:in`block in load_config_initializer' 2014-07-23T07:01 :02.819499 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in`each_strongly_connected_component_from' 2014-07 -23T07:01:02.819476 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/r ailties-4.1.4 / lib / rails / engine.rb:647:in`load_config_initializer' 2014-07-23T07:01:02.819485 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / gems / railties-4.1.4 / lib / rails / initializable.rb:30:在`instance_exec' 2014-07-23T07:01:02.819488 + 00:00 app [web .1]:from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in`run' 2014-07-23T07: 01:02.819497 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:418:in`block(2 levels)in each_strongly_connected_component_from' 2014-07-23T07:01:02.819550 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:在`call' 2014-07-23T07:01:02.819553 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort。 rb:224:在`tsort_each' 2014-07-23T07:01:02.819551 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1。 0 / tsort.rb:345:在`each_strongly_connected_component' 2014-07-23T07:01:02.819554 + 00:00 app [web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in`tsort_each' 2014-07-23T07:01:02.819559 + 00:00 app [web .1]:从/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/application.rb:300:in`initialize!' 2014-07-23T07 :01:02.819560 + 00:00 app [web.1]:from /app/config/environment.rb:5:in`< top(required)>' 2014-07-23T07:01: 02.819564 + 00:00 app [web.1]:from config.ru:4:in`require' 2014-07-23T07:01:02.819569 + 00:00 app [web.1]:from / app /vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in`instance_eval' 2014-07-23T07:01:02.819570 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in`initialize' 2014-07 -23T07:01:02.819574 + 00:00 app [web.1]:from config.ru:1:in`new' 2014-07-23T07:01:02.819566 + 00:00 app [web.1 ]:from config.ru:4:in`block in< main>' 2014-07-23T07:01:02.819511 + 00:00 app [web.1]:from / app / vendor / ruby- 2.1.2 / LIB /红宝石/ 2。 1.0 / tsort.rb:411:在`each_strongly_connected_component_from' 2014-07-23T07:01:02.819482 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/ gems / railties-4.1.4 / lib / rails / engine.rb:611:在`each' 2014-07-23T07:01:02.819580 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / gems / unicorn-4.8.3 / lib / unicorn.rb:48:在`block in builder'中 2014-07-23T07:01:02.819583 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in`call' 2014-07- 23T07:01:02。 819575 + 00:00 app [web.1]:from config.ru:1:in`< main>' 2014-07-23T07:01:02.819584 + 00:00 app [web .1]:从/app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in`build_app!' 2014-07-23T07 :01:02.819589 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in`< top(必填项)>' 2014-07-23T07:01:02.819612 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in` < main>' 2014-07-23T07:01:02.819578 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3 /lib/unicorn.rb:48:in`eval' 2014-07-23T07:01:02.819557 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0 /gems/railties-4.1.4/lib/rails/initializable.rb:54:in`run_initializers' 2014-07-23T07:01:02.819494 + 00:00 app [web.1]:from / app /vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in`each_strongly_connected_component'中的块(2级)' 2014-07-23T07:01:02。 819546 + 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in`each' 2014-07- 23T07:01:02.819587 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in`开始' 2014-07-23T07:01:02.819611 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in`load' 2014-07-23T07:01:04.031160 + 00:00 heroku [web.1]:状态从开始变为崩溃 2014-07-23T07:01:04.733648 + 00:00 heroku [router ]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 86caffee-16f4-4f06-a6d8-7930d96c7135 fwd =54.237.152.106dyno = connect = service = status = 503字节= 2014-07-23T07:01:04.020673 + 00:00 heroku [web.1]:进程退出状态1 2014-07-23T07:01:00.263828 +00:00 heroku [web.1]:用命令`bundle exec unicorn -p 5019 -c。/ config / unicorn.rb`启动进程 2014-07-23T07:01:17.938391 + 00:00 heroku [router]:at =错误代码= H10 desc =A pp crashedmethod = GET path =/host = cfilink.herokuapp request_id = 96c1bf22-04ca-408b-b2c5-6a6282763eb2 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:21.119579 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 14e4d82e- c91f-49eb-bd81-d689e6f0f75a fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:22.528876 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 343a0401-da9f-4ec6-99a1-70489632e40b fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:24.008236 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 47981f94-e284-4b18-bec2-282f656e5289 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:25.044701 + 00:00 heroku [路由器]:at =错误代码= H10 desc =应用程序c rashedmethod = GET path =/host = cfilink.herokuapp.co m request_id = 56593500-3931-4e5f-a44d-1b65879dff76 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:27.515189 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = d7b8d1b8-272a-4f05-b962-88e74fb27647 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:29.495853 + 00:00 heroku [router]: at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 15f0a28d-9d90-4114-bdc2-86ced1502757 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:01:52.893456 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path =/host = cfilink.herokuapp request_id = 08f79ef3-8a34-4098-856e-6a841bbc9214 fwd =99.169.168.250dyno = connect = service = status = 503 bytes = 2014-07-23T07:08:27.346505 + 00: 00 heroku [web.1]:从坠毁的t改变为状态o开始 2014-07-23T07:08:32.470674 + 00:00 app [web.1]:I,[2014-07-23T07:08:32.470553#2] INFO - :刷新宝石列表 2014-07-23T07:08:33.337873 + 00:00 app [web.1]:from /app/config/initializers/devise.rb:13:in`block in< top(required)>' 2014-07-23T07:08:33.337880 + 00:00应用[web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies .rb:241:`load' 2014-07-23T07:08:33.337886 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/activesupport -4.1.4 / lib / active_support / dependencies.rb:241:在`load'中 2014-07-23T07:08:33.337893 + 00:00 app [web.1]:from / app / vendor / bundle /ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:647:in`load_config_initializer' 2014-07-23T07:08:33.337883 + 00:00 app [web。 1]:from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in`load_dependency' 2014-07-23T07:08 :33.337888 + 00:00 app [web.1]:from / app / vendor / bu ndle / ruby / 2.1.0 / gems / railties-4.1.4 / lib / rails / engine.rb:648:在`block in load_config_initializer' 2014-07-23T07:08:33.337922 + 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in'block(2 levels)in each_strongly_connected_component' 2014-07- 23T07:08:33.337926 + 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:417:in`block in each_strongly_connected_component_from' 2014-07-23T07:08:33.337865 + 00:00 app [web.1]:/app/config/initializers/devise.rb:13:in`+':不隐式将nil转换为String(TypeError) 2014-07-23T07:08:33.337889 + 00:00应用[web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/ notifications.rb:161:`instrument' 2014-07-23T07:08:33.337894 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/在< class:Engine>' 2014-07-23T07:08:33.337918 + 00:00应用程序中的'block(2 levels)中,railties-4.1.4 / lib / rails / engine.rb: web.1]:从/ app / vendor / ruby-2.1.2 / lib / ruby / 2.1.0 / tsort.rb:226:在`block in tsort_each' 2014-07-23T07:08:33.337876 + 00:00 app [web.1 ]:from /app/config/initializers/devise.rb:3:in`< top(required)>' 2014-07-23T07:08:33.337881 + 00:00 app [web.1] :from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in`block in load' 2014-07-23T07:08 :33.337940 + 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in`call' 2014-07 -23T07:08:33.337874 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise.rb:288:in`setup ' 2014-07-23T07:08:33.337898 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails /engine.rb:611:in`each' 2014-07-23T07:08:33.337929 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems /railties-4.1.4/lib/rails/initializable.rb:44:in`tsort_each_child' 2014-07-23T07:08:33.337932 + 00:00 app [web.1]:from / app / ve ndor / ruby-2.1.2 / lib / ruby / 2.1.0 / tsort.rb:411:在`call' 2014-07-23T07:08:33.337900 + 00:00 app [web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in`block in< class:Engine>' 2014-07 -23T07:08:33.337905 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/ra ilties-4.1.4 / lib / rails / initializable。 rb:30:'run' 2014-07-23T07:08:33.337908 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/railties- 4.1.4 / lib / rails / initializable.rb:55:在`block in run_initializers' 2014-07-23T07:08:33.337923 + 00:00 app [web.1]:from / app / vendor / ruby-2.1.2 / lib / ruby / 2.1.0 / tsort.rb:418:在`block(2 levels)in each_strongly_connected_component_from' 2014-07-23T07:08:33.337935 + 00:00 app [web .1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in`block in each_strongly_connected_component' 2014-07-23T07:08:33.337936+ 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in`ea ch' 2014-07-23T07:08:33.337903 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/ rails / initializable.rb:30:`instance_exec' 2014-07-23T07:08:33.337925 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ ruby / 2.1.0 / tsort.rb:427:in`each_strongly_connected_component_from' 2014-07-23T07:08:33.337927 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / gems / railties-4.1.4 / lib / rails / initializable.rb:44:在`each' 2014-07-23T07:08:33.337953 + 00:00 app [web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in`run_initializers' 2014-07-23T07:08:33.337934+ 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:411:in`each_strongly_connected_component_from' 2014-07-23T07: 08:33.337946 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in`tsort_each' 2014- 07-23T07:08:33.337943 + 00:00 app [web.1]:从/app/vendor/ruby-2.1.2/lib/r uby / 2.1.0 / tsort.rb:345:在'each_strongly_connected_component' 2014-07-23T07:08:33.337979 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / gems / rack-1.5.2 / lib / rack / builder.rb:55:in`instance_eval' 2014-07-23T07:08:33.337954 + 00:00 app [web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/application.rb:300:in`initialize!' 2014-07-23T07:08:33.337974 +00:00 app [web.1]:from config.ru:4:in`require' 2014-07-23T07:08:33.337982 + 00:00 app [web.1]:from config.ru :1:`new' 2014-07-23T07:08:33.337972 + 00:00 app [web.1]:from /app/config/environment.rb:5:in`< top(必填项)>' 2014-07-23T07:08:33.337950 + 00:00 app [web.1]:from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort。 rb:205:在'tsort_each' 2014-07-23T07:08:33.337978 + 00:00 app [web.1]:from config.ru:4:in`block in< main>' 2014-07-23T07:08:33.337984 + 00:00 app [web.1]:from config.ru:1:in`< main>' 2014-07-23T07:08:33.337981+ 0 0:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in`initialize' 2014-07-23T07:08:33.337986 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48: in`block in builder' 2014-07-23T07:08:33.337985 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8。 3 / lib / unicorn.rb:48:在`eval' 2014-07-23T07:08:33.337988 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1。 0 / gems / unicorn-4.8.3 / lib / unicorn / http_server.rb:764:在`call' 2014-07-23T07:08:33.337996 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / bin / unicorn:23:`load' 2014-07-23T07:08:33.337991 + 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.1.0 / gems / unicorn-4.8.3 / lib / unicorn / http_server.rb:764:在`build_app!' 2014-07-23T07:08:33.337993 + 00:00 app [web.1]:从/app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in`start' 2014-07 -23T07:08:33.33799 4 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in`< top(required)> ' 2014-07-23T07:08:33.337997 + 00:00 app [web.1]:from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in`< main> ;' 2014-07-23T07:08:34.476119 + 00:00 heroku [web.1]:状态从开始变为崩溃 2014-07-23T07:08:30.884736 + 00:00 heroku [web.1]:用命令`bundle exec unicorn -p 40495 -c。/ config / unicorn.rb`启动进程 2014-07-23T07:08:34.441069 + 00:00 heroku [web.1] :进程退出状态1 2014-07-23T07:12:52.276241 + 00:00 heroku [router]:at = error code = H10 desc =应用程序崩溃method = GET path =/host = cfilink.herokuapp request_id = 74ecf2fe-bcc2-4beb-9d0c-09be5181e4d8 fwd =99.169.168.250dyno = connect = service = status = 503 bytes =这是我的Gem文件
source'rubygems' ruby'2.1.2' gem'rails','4.1.4' gem'sass-rails','〜> 4.0.3' gem'uglifier','> = 1.3.0' gem'coffee-rails','〜> 4.0.0' gem'jquery-rails' gem'turbolinks' gem'jbuilder','〜> 2.0' gem'sdoc','〜> 0.4.0',group::doc gem'spring',group::development gem'bootstrap-sass' gem'devise','〜> 3.2.4'宝石'devise_invitable'宝石'pg'宝石'pundit'宝石'独角兽'宝石'独角兽' gem'figaro' gem'rails_12factor','〜> 0.0.2' group:development do gem'better_errors' gem'binding_of_caller',:platforms => [:mri_21] gem'guard-bundler' gem'guard-rails' gem'guard-rspec' gem'hub',:require =>无 gem'quiet_assets' gem'rails_layout' gem'rb-fchange',:require => false gem'rb-fsevent',:require => false gem'rb-inotify',:require => false end group:development,:test do gem'factory_girl_rails' gem'rspec-rails' end group:test do gem'capybara' gem'database_cleaner' gem'faker' gem'launchy' gem'selenium-webdriver' end我的secrets.yml文件
开发: admin_name:第一个用户 admin_email:user@example admin_password:changeme email_provider_username:<%= E NV [GMAIL_USERNAME]%> email_provider_password:<%= ENV [GMAIL_PASSWORD]%> DOMAIN_NAME:example secret_key_base:7032833bb8e9bf8f3d46ad9b886aca9bb41a0d92adb3c1080570e24bdb31459d240f58721d7681b2486d5d9d352a608feb434be880c507155e719a9dfe678b19 测试: DOMAIN_NAME:example secret_key_base:0de0958bbdd2608a2e1a4378660d4ec4f50b2df23cd85f5508c5bb1c821cb129bc9f799421deb622950c0e3ba7e344d8ee3fe693b8b162aa4b685907ff8df13e #不要在仓库中保留生产秘密,#而是从环境中读取值。 制作: admin_name:<%= ENV [ADMIN_NAME]%> admin_email:<%= ENV [ADMIN_EMAIL]%> admin_password:<%= ENV [ADMIN_PASSWORD]%> email_provider_username:<%= ENV [GMAIL_USERNAME]%> email_provider_password:<%= ENV [GMAIL_PASSWORD]%> domain_name:<%= ENV [DOMAIN_NAME]%> secret_key_base:<%= ENV [SECRET_KEY_BASE]%>我的application.yml文件(figaro gem)
GMAIL_USERNAME:myusername@gmail GMAIL_PASSWORD:mypassword DOMAIN_NAME:studiorooster 解决方案这是真正导致错误的原因。
/app/config/initializers/devise.rb:13如果你仍然有这个代码13
config.mailer_sender ='no-reply @'+ Rails.application。 secrets.domain_name然后原因是 Rails.application.secrets.domain_name 是零。在Heroku中,你必须通过einvironment变量设置秘密,并在生产部分的erb parsed secrets.yml中读取它们。
eg #secrets.yml 开发: 域名:example 生产:域名:<% = ENV ['DOMAIN_NAME']%>
This answer seems to have been answered in various ways, but none that seemed to fit my exact issue. I am using the app from RailsApps github/RailsApps/rails-devise-pundit
The app works perfectly on my local Ubuntu 14.04 machine, but when I deploy it to Heroku, I get an 'application error' on the page my app should have been started. I ran 'heroku logs' but can't be sure what the exact issue is. Below is my log as well as my Gem file. Any help would be greatly appreciated. Thank you.
Here is My Log
2014-07-23T07:01:02.819470+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load' 2014-07-23T07:01:02.819467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load' 2014-07-23T07:01:02.819544+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component' 2014-07-23T07:01:02.819471+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:648:in `block in load_config_initializer' 2014-07-23T07:01:02.819499+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from' 2014-07-23T07:01:02.819476+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:647:in `load_config_initializer' 2014-07-23T07:01:02.819485+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec' 2014-07-23T07:01:02.819488+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run' 2014-07-23T07:01:02.819497+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from' 2014-07-23T07:01:02.819550+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call' 2014-07-23T07:01:02.819553+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each' 2014-07-23T07:01:02.819551+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component' 2014-07-23T07:01:02.819554+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each' 2014-07-23T07:01:02.819559+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!' 2014-07-23T07:01:02.819560+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>' 2014-07-23T07:01:02.819564+00:00 app[web.1]: from config.ru:4:in `require' 2014-07-23T07:01:02.819569+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval' 2014-07-23T07:01:02.819570+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize' 2014-07-23T07:01:02.819574+00:00 app[web.1]: from config.ru:1:in `new' 2014-07-23T07:01:02.819566+00:00 app[web.1]: from config.ru:4:in `block in <main>' 2014-07-23T07:01:02.819511+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from' 2014-07-23T07:01:02.819482+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in `each' 2014-07-23T07:01:02.819580+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder' 2014-07-23T07:01:02.819583+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call' 2014-07-23T07:01:02. 819575+00:00 app[web.1]: from config.ru:1:in `<main>' 2014-07-23T07:01:02.819584+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!' 2014-07-23T07:01:02.819589+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>' 2014-07-23T07:01:02.819612+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>' 2014-07-23T07:01:02.819578+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval' 2014-07-23T07:01:02.819557+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers' 2014-07-23T07:01:02.819494+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' 2014-07-23T07:01:02.819546+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each' 2014-07-23T07:01:02.819587+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start' 2014-07-23T07:01:02.819611+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load' 2014-07-23T07:01:04.031160+00:00 heroku[web.1]: State changed from starting to crashed 2014-07-23T07:01:04.733648+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=86caffee-16f4-4f06-a6d8-7930d96c7135 fwd="54.237.152.106" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:04.020673+00:00 heroku[web.1]: Process exited with status 1 2014-07-23T07:01:00.263828+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 5019 -c ./config/unicorn.rb` 2014-07-23T07:01:17.938391+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=96c1bf22-04ca-408b-b2c5-6a6282763eb2 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:21.119579+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=14e4d82e-c91f-49eb-bd81-d689e6f0f75a fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:22.528876+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=343a0401-da9f-4ec6-99a1-70489632e40b fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:24.008236+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=47981f94-e284-4b18-bec2-282f656e5289 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:25.044701+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp.co m request_id=56593500-3931-4e5f-a44d-1b65879dff76 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:27.515189+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=d7b8d1b8-272a-4f05-b962-88e74fb27647 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:29.495853+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=15f0a28d-9d90-4114-bdc2-86ced1502757 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:01:52.893456+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=08f79ef3-8a34-4098-856e-6a841bbc9214 fwd="99.169.168.250" dyno= connect= service= status=503 bytes= 2014-07-23T07:08:27.346505+00:00 heroku[web.1]: State changed from crashed to starting 2014-07-23T07:08:32.470674+00:00 app[web.1]: I, [2014-07-23T07:08:32.470553 #2] INFO -- : Refreshing Gem list 2014-07-23T07:08:33.337873+00:00 app[web.1]: from /app/config/initializers/devise.rb:13:in `block in <top (required)>' 2014-07-23T07:08:33.337880+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load' 2014-07-23T07:08:33.337886+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load' 2014-07-23T07:08:33.337893+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:647:in `load_config_initializer' 2014-07-23T07:08:33.337883+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency' 2014-07-23T07:08:33.337888+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:648:in `block in load_config_initializer' 2014-07-23T07:08:33.337922+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' 2014-07-23T07:08:33.337926+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from' 2014-07-23T07:08:33.337865+00:00 app[web.1]: /app/config/initializers/devise.rb:13:in `+': no implicit conversion of nil into String (TypeError) 2014-07-23T07:08:33.337889+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/notifications.rb:161:in `instrument' 2014-07-23T07:08:33.337894+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>' 2014-07-23T07:08:33.337918+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each' 2014-07-23T07:08:33.337876+00:00 app[web.1]: from /app/config/initializers/devise.rb:3:in `<top (required)>' 2014-07-23T07:08:33.337881+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load' 2014-07-23T07:08:33.337940+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call' 2014-07-23T07:08:33.337874+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/devise-3.2.4/lib/devise.rb:288:in `setup' 2014-07-23T07:08:33.337898+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in `each' 2014-07-23T07:08:33.337929+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:44:in `tsort_each_child' 2014-07-23T07:08:33.337932+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:411:in `call' 2014-07-23T07:08:33.337900+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in `block in <class:Engine>' 2014-07-23T07:08:33.337905+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/ra ilties-4.1.4/lib/rails/initializable.rb:30:in `run' 2014-07-23T07:08:33.337908+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers' 2014-07-23T07:08:33.337923+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from' 2014-07-23T07:08:33.337935+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component' 2014-07-23T07:08:33.337936+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each' 2014-07-23T07:08:33.337903+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec' 2014-07-23T07:08:33.337925+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from' 2014-07-23T07:08:33.337927+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:44:in `each' 2014-07-23T07:08:33.337953+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers' 2014-07-23T07:08:33.337934+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from' 2014-07-23T07:08:33.337946+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each' 2014-07-23T07:08:33.337943+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component' 2014-07-23T07:08:33.337979+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval' 2014-07-23T07:08:33.337954+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!' 2014-07-23T07:08:33.337974+00:00 app[web.1]: from config.ru:4:in `require' 2014-07-23T07:08:33.337982+00:00 app[web.1]: from config.ru:1:in `new' 2014-07-23T07:08:33.337972+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>' 2014-07-23T07:08:33.337950+00:00 app[web.1]: from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each' 2014-07-23T07:08:33.337978+00:00 app[web.1]: from config.ru:4:in `block in <main>' 2014-07-23T07:08:33.337984+00:00 app[web.1]: from config.ru:1:in `<main>' 2014-07-23T07:08:33.337981+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize' 2014-07-23T07:08:33.337986+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder' 2014-07-23T07:08:33.337985+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval' 2014-07-23T07:08:33.337988+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call' 2014-07-23T07:08:33.337996+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load' 2014-07-23T07:08:33.337991+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!' 2014-07-23T07:08:33.337993+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start' 2014-07-23T07:08:33.337994+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>' 2014-07-23T07:08:33.337997+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>' 2014-07-23T07:08:34.476119+00:00 heroku[web.1]: State changed from starting to crashed 2014-07-23T07:08:30.884736+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 40495 -c ./config/unicorn.rb` 2014-07-23T07:08:34.441069+00:00 heroku[web.1]: Process exited with status 1 2014-07-23T07:12:52.276241+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cfilink.herokuapp request_id=74ecf2fe-bcc2-4beb-9d0c-09be5181e4d8 fwd="99.169.168.250" dyno= connect= service= status=503 bytes=And here is my Gem File
source 'rubygems' ruby '2.1.2' gem 'rails', '4.1.4' gem 'sass-rails', '~> 4.0.3' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc gem 'spring', group: :development gem 'bootstrap-sass' gem 'devise', '~> 3.2.4' gem 'devise_invitable' gem 'pg' gem 'pundit' gem 'unicorn' gem 'unicorn-rails' gem 'figaro' gem 'rails_12factor', '~> 0.0.2' group :development do gem 'better_errors' gem 'binding_of_caller', :platforms=>[:mri_21] gem 'guard-bundler' gem 'guard-rails' gem 'guard-rspec' gem 'hub', :require=>nil gem 'quiet_assets' gem 'rails_layout' gem 'rb-fchange', :require=>false gem 'rb-fsevent', :require=>false gem 'rb-inotify', :require=>false end group :development, :test do gem 'factory_girl_rails' gem 'rspec-rails' end group :test do gem 'capybara' gem 'database_cleaner' gem 'faker' gem 'launchy' gem 'selenium-webdriver' endMy secrets.yml file
development: admin_name: First User admin_email: user@example admin_password: changeme email_provider_username: <%= ENV["GMAIL_USERNAME"] %> email_provider_password: <%= ENV["GMAIL_PASSWORD"] %> domain_name: example secret_key_base: 7032833bb8e9bf8f3d46ad9b886aca9bb41a0d92adb3c1080570e24bdb31459d240f58721d7681b2486d5d9d352a608feb434be880c507155e719a9dfe678b19 test: domain_name: example secret_key_base: 0de0958bbdd2608a2e1a4378660d4ec4f50b2df23cd85f5508c5bb1c821cb129bc9f799421deb622950c0e3ba7e344d8ee3fe693b8b162aa4b685907ff8df13e # Do not keep production secrets in the repository, # instead read values from the environment. production: admin_name: <%= ENV["ADMIN_NAME"] %> admin_email: <%= ENV["ADMIN_EMAIL"] %> admin_password: <%= ENV["ADMIN_PASSWORD"] %> email_provider_username: <%= ENV["GMAIL_USERNAME"] %> email_provider_password: <%= ENV["GMAIL_PASSWORD"] %> domain_name: <%= ENV["DOMAIN_NAME"] %> secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>My application.yml file (figaro gem)
GMAIL_USERNAME: myusername@gmail GMAIL_PASSWORD: mypassword DOMAIN_NAME: studiorooster解决方案
This is what really caused the error
/app/config/initializers/devise.rb:13If you still have this code in 13
config.mailer_sender = 'no-reply@' + Rails.application.secrets.domain_nameThen the reason is that Rails.application.secrets.domain_name is nil. On Heroku you have to set the secrets through einvironment variables und read them in the erb parsed secrets.yml in the production section
e.g #secrets.yml development: domain_name: example production: domain_name: <%= ENV['DOMAIN_NAME'] %>
更多推荐
部署Rails应用程序Heroku保持崩溃
发布评论