首页 文章

Rails:heroku上的应用程序错误

提问于
浏览
0

我成功地将我的应用程序部署到了heroku然后 heroku open 我在我的网页上得到了 Application Error . 我做了 heroku restart 但尝试了但没有奏效 . 我做了heroku日志和heroku运行rails控制台但仍然混淆了我得到的错误 . 以下是我看起来错误的看法 .

2016-09-16T14:06:10.615311 00:00 heroku [web.1]:使用命令bin / rails server启动进程-p 29036 -e production 2016-09-16T14:06:13.802759 00:00 app [web . 1]:=>启动WEBrick 2016-09-16T14:06:13.802787 00:00 app [web.1]:=> Rails 4.2.5.1应用程序从http:/ 0.0.0.0:29036开始 生产环境 2016-09- 16T14:06:13.802788 00:00 app [web.1]:=>运行rails server -h获取更多启动选项2016-09-16T14:06:13.802788 00:00 app [web.1]:=> Ctrl-C关闭服务器2016-09-16T14:06:13.802789 00:00 app [web.1]:退出2016-09-16T14:06:13.802793 00:00 app [web.1]:/app/vendor/ruby-2.3 .0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:319:在visit_Psych_Nodes_Alias'块中:无法loadRails.application.database_configuration :( Psych :: BadAlias)2016-09-16T14:06:13.802793 00 :00 app [web.1]:未知别名:默认2016-09-16T14:06:13.802794 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3 . 0 / psych / visitors / to_ruby.rb:319:infetch'2016-09-16T14:06:13.802795 00:00 app [web.1]:来自/ app / ven dor / ruby-2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:319:in visit_Psych_Nodes_Alias'2016-09-16T14:06:13.802795 00:00 app [web.1]:from / app / vendor / ruby-2.3.0 / lib / ruby / 2.3.0 / psych / visitors / visitor.rb:16:inseisit'2016-09-16T14:06:13.802796 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:6:in接受'2016-09-16T14:06:13.802796 00:00 app [web.1] :来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:32:inaccept'2016-09-16T14:06:13.802796 00:00 app [web.1 ]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:338:in block in revive_hash'2016-09-16T14:06:13.802797 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:ineach'2016-09-16T14:06:13.802797 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:in each_slice'2016-09-16T14:06:13.802798 00 :00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:inrevive_has h'2016-09-16T14:06:13.802798 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:162 :in visit_Psych_Nodes_Mapping'2016-09-16T14:06:13.802798 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb :16:invisit'2016-09-16T14:06:13.802799 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor . rb:6:接受'2016-09-16T14:06:13.802799 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/ to_ruby.rb:32:inaccept'2016-09-16T14:06:13.802800 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors /to_ruby.rb:338:in blockive in revive_hash'2016-09-16T14:06:13.802800 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0 /psych/visitors/to_ruby.rb:336:ineach'2016-09-16T14:06:13.802800 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3 . 0 / psych / visitors / to_ruby.rb:336:in each_slice'2016-09-16T14:06:13.802801 00:00 app [web.1]:from / app / vendor / ruby- 2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:336:inrevive_hash'2016-09-16T14:06:13.802802 00:00 app [web.1]:from / app / vendor / ruby -2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:162:in visit_Psych_Nodes_Mapping'2016-09-16T14:06:13.802802 00:00 app [web.1]:来自/ app / vendor /ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:16:invisit'2016-09-16T14:06:13.802802 00:00 app [web.1]:from / app / vendor / ruby-2.3.0 / lib / ruby / 2.3.0 / psych / visitors / visitor.rb:6:in accept'2016-09-16T14:06:13.802803 00:00 app [web.1]:from / app / vendor / ruby-2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:311:invisit_Psych_Nodes_Document'2016-09-16T14:06:13.802803 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:16:in访问'2016-09-16T14:06:13.802804 00:00 app [web.1] :来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:6:inaccept'2016-09-16T14:06:13.802804 00:00 app [web.1 ]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:32:in接受'2016 -09-16T14:06:13.802806 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych.rb:253:inload'2016-09- 16T14:06:13.802813 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application/configuration.rb:104:in database_configuration'2016-09-16T14:06:13.802806 00:00 app [ web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/nodes/node.rb:38:into_ruby'2016-09-16T14:06:13.802814 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:117:in <class:Railtie>中的块(2级) '2016-09-16T14:06:13.802803 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:32:不安全'2016-09-16T14:06:13.802815 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb :38:in instance_eval'2016-09-16T14:06:13.802815 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support /lazy_load_hooks.rb:38:inexecute_hook'2016-09-16T14:06:13.802816 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/ LIB / active_su pport / lazy_load_hooks.rb:45:在run_load_hooks的块中2016-09-16T14:06:13.802816 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport- 4.2.5.1/lib/active_support/lazy_load_hooks.rb:44:ineach'2016-09-16T14:06:13.802816 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems /activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:44:in run_load_hooks'2016-09-16T14:06:13.802817 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3 .0 / gems / activerecord-4.2.5.1 / lib / active_record / base.rb:315:在'2016-09-16T14:06:13.802818 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.3.0 / gems / activerecord-4.2.5.1 / lib / active_record / base.rb:26:in <top(required)>'2016-09-16T14:06:13.802818 00:00 app [web.1] :来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:inrequire'2016-09-16T14:06:13.802820 00:00 app [web .1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:在require'2中的块016-09-16T14:06:13.802821 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240 :inload_dependency'2016-09-16T14:06:13.802822 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies . rb:274:在require'2016-09-16T14:06:13.802844 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/ active_record / relation / predicate_builder.rb:121:在'2016-09-16T14:06:13.802845 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2 .5.1 / lib / active_record / relation / predicate_builder.rb:2:in <module:ActiveRecord>'2016-09-16T14:06:13.802845 00:00 app [web.1]:from / app / vendor / bundle / ruby /2.3.0/gems/activerecord-4.2.5.1/lib/active_record/relation/predicate_builder.rb:1:in'2016-09-16T14:06:13.802845 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.3.0 / gems / activesupport-4.2.5.1 / lib / active_support / dependencies.rb:274:in require'2016-09-16T14:06 :13.802846 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:inblock in require'2016- 09-16T14:06:13.802846 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in load_dependency'2016-09-16T14:06:13.802848 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb :274:inrequire'2016-09-16T14:06:13.802848 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/ dependencies / autoload.rb:70:在eager_load的块中!' 2016-09-16T14:06:13.802849 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies/autoload.rb :70:ineach_value'2016-09-16T14:06:13.802849 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record . rb:160:在eager_load中!' 2016-09-16T14:06:13.802849 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies/autoload.rb :70:ineager_load“! 2016-09-16T14:06:13.802851 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application/finisher.rb :56:每个'2016-09-16T14:06:13.802851 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails /application/finisher.rb:56:inblock,'2016-09-16T14:06:13.802853 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in instance_exec'2016-09-16T14:06:13.802853 00:00 app [web . 1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:inrun'2016-09-16T14:06:13.802854 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in block in run_initializers'2016-09-16T14:06 :13.802855 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:inblock in tsort_each'2016-09-16T14:06: 13.802857 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in block_strongly_connected_component'2016-09-块(2级) 16T14:06:13.802869 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:ineach_strongly_connected_component_from'2016-09-16T14:06 :13.802870 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in block_s in each_strongly_connected_component'2016-09-16T14:06 :13.80287 0 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:ineach'2016-09-16T14:06:13.802870 00: 00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in call'2016-09-16T14:06:13.802884 00:00 app [web.1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:ineach_strongly_connected_component'2016-09-16T14:06:13.802885 00:00 app [web . 1]:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in tsort_each'2016-09-16T14:06:13.802885 00:00 app [web.1] :来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:intsort_each'2016-09-16T14:06:13.802885 00:00 app [web.1]:来自/ app / vendor / bundle / ruby / 2.3.0 / gems / railties-4.2.5.1 / lib / rails / initializable.rb:54:in run_initializers'2016-09-16T14:06:13.802887 00:00 app [web.1 ]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application.rb:352:ininitialize!' 2016-09-16T14:06:13.802888 00:00 app [web.1]:来自/app/config/environment.rb:5:in <top(required)>'2016-09-16T14:06:13.802889 00: 00 app [web.1]:来自/app/config.ru:3:inrequire'2016-09-16T14:06:13.802889 00:00 app [web.1]:来自/app/config.ru:3:in阻止在<main>'2016-09-16T14:06:13.802890 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack /builder.rb:55:ininstance_eval'2016-09-16T14:06:13.802892 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/ lib / rack / builder.rb:55:初始化'2016-09-16T14:06:13.802893 00:00 app [web.1]:from /app/config.ru:innew'2016-09-16T14:06: 13.802894 00:00 app [web.1]:来自/app/config.ru:in <main>'2016-09-16T14:06:13.802895 00:00 app [web.1]:来自/ app / vendor / bundle /ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:ineval'2016-09-16T14:06:13.802897 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.3.0 / gems / rack-1.6.4 / lib / rack / builder.rb:49:in new_from_string'2016-09-16T14:06:13.802909 00:00 app [web.1]:来自/ app / vendor / bundle / ruby / 2.3.0 / gems / rack-1.6.4 / lib / rack / builder.rb:40:inparse_file'2016-09-16T14:06:13.802910 00:00 app [web.1] :来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:299:in build_app_and_options_from_config'2016-09-16T14:06:13.802910 00:00 app [ web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:208:inapp'2016-09-16T14:06:13.802913 00: 00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/server.rb:61:in app'2016-09-16T14 :06:13.802915 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:336:inwrapped_app'2016- 09-16T14:06:13.802916 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:272:in开始'2016-09-16T14:06:13.802916 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/server .rb:80:instart'2016-09-16T14:06:13.802916 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/ra ilties-4.2.5.1 / lib / rails / commands / commands_tasks.rb:80:in in server'2016-09-16T14:06:13.802917 00:00 app [web.1]:from / app / vendor / bundle / ruby / 2.3.0 / gems / railties-4.2.5.1 / lib / rails / commands / commands_tasks.rb:75:inmpp'2016-09-16T14:06:13.802930 00:00 app [web.1]:from / app /vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in server'2016-09-16T14:06:13.802931 00:00 app [web . 1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!' 2016-09-16T14:06:13.802932 00:00 app [web.1]:来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in <top(required)>'2016-09-16T14:06:13.802935 00: 00 app [web.1]:来自bin / rails:9:inrequire'2016-09-16T14:06:13.802935 00:00 app [web.1]:来自bin / rails:9:in`'2016-09- 16T14:06:13.872751 00:00 heroku [web.1]:状态从开始变为崩溃2016-09-16T14:06:13.872732 00:00 heroku [web.1]:进程退出状态1 2016-09-16T15 :29:42.219103 00:00 heroku [router]:at = error code = H10 desc =“App crashed”method = GET path =“/”host = shrouded-mountain-58433.herokuapp.com request_id = 555caccd-f3cb-41c0 -9e1e-ff9b44b26cd0 fwd =“124.219.169.191”dyno = connect = service = status = 503 bytes =以下是heroku run rails console /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/ visitor / to_ruby.rb:319:在visit_Psych_Nodes_Alias'块中:无法loadRails.application.database_configuration :( Psych :: BadAlias)未知别名:默认来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0 /psych/visitors/to_ruby.rb:319:infetch'来自/ app / vendor /ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:319:in visit_Psych_Nodes_Alias'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/ visitor / visitor.rb:16:visisit'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:6:in接受'来自/ app / vendor / ruby -2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:32:accepten'from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby .rb:338:在revive_hash中的块中来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:ineach'来自/ app / vendor / ruby- 2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:336:in each_slice'from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby .rb:336:inrevive_hash'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:162:in visit_Psych_Nodes_Mapping'来自/app/vendor/ruby-2.3 . 0 / lib / ruby / 2.3.0 / psych / visitors / visitor.rb:16:visisit'from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb: 6:在接受'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/ visitor / to_ruby.rb:32:来自/ app / vendor / from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:338:in block in revive_hash' /ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:ineach'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors /to_ruby.rb:336:in each_slice'来自/ app / vendor / ruby-/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:336:inrevive_hash' 2.3.0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:162:in visit_Psych_Nodes_Mapping'from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor .rb:16:邀请来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:6:in接受'来自/app/vendor/ruby-2.3 . 0 / lib / ruby / 2.3.0 / psych / visitors / to_ruby.rb:32:accepten'from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb: 311:来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/visitor.rb:16:invisit'的visit_Psych_Nodes_Document'来自/app/vendor/ruby-2.3.0/lib /ruby/2.3.0/psych/visitors/visitor.rb:6:in接受来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych/visitors/to_ruby.rb:32:inaccept'来自/app/vendor/ruby-2.3.0/lib/ruby/ 2.3.0 / psych / nodes / node.rb:38:来自/ app / vendor的/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/psych.rb:253:inload'中的to_ruby' /bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application/configuration.rb:104:in database_configuration'来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb的4.2.5.1/lib/active_record/railtie.rb:117:inblock(2个级别) :38:in instance_eval'from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:inexecute_hook'from / app / vendor / bundle / ruby / 2.3.0 / gems / activesupport-4.2.5.1 / lib / active_support / lazy_load_hooks.rb:45:bull in run_load_hooks'from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib /active_support/lazy_load_hooks.rb:44:ineach'来自/app/vendor/bundle/ruby/2.3.0/gems/active support-4.2.5.1 / lib / active_support / lazy_load_hooks.rb:44:in run_load_hooks'from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/base.rb:315 :来自/ app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/base.rb:26:in <top(required)>'来自/ app / vendor / bundle来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib的/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:inrequire' /active_support/dependencies.rb:274:in在/app/vendor/bundle/ruby/2.3中阻止来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:inload_dependency' . 0 / gems / activesupport-4.2.5.1 / lib / active_support / dependencies.rb:274:in require'from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/relation /predicate_builder.rb:121:in来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/relation/predicate_builder.rb:2:in <module:ActiveRecord>'来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record/relation/predicate_builder.rb:1:in'来自/app/vendor/bundle/ruby/2.3.0/ gems / activesupport-4.2.5.1 / lib / active_support / dependencies.rb:274:in require'from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb :274:in / in / app / vendor / bundle [R uby / 2.3.0 / gems / activesupport-4.2.5.1 / lib / active_support / dependencies.rb:274:inrequire'from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/ active_support / dependencies / autoload.rb:70:在eager_load的块中!'来自/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies/autoload.rb:70:ineach_value'来自/app/vendor/bundle/ruby/2.3.0/ gems / activesupport-4.2.5.1 / lib / active_support / dependencies / autoload.rb:70:in eager_load!'来自/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.1/lib/active_record.rb:160:ineager_load!'来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application/finisher.rb:56:in每个'来自/app/vendor/bundle/ruby/2.3.0 /gems/railties-4.2.5.1/lib/rails/application/finisher.rb:56:inblock in'from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/ initializable.rb:30:在/ app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:inrun'中的instance_exec'来自/ app / vendor / bundle /ruby /3 / / / / / / / / / / / / / / tsort.rb:228:tsort_each'inblock from /app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in block(2 levels)in each_strongly_connected_component'from / app / vendor /ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:ineach_strongly_connected_component_from'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in来自/ app / vendor的/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:ineach'中的each_strongly_connected_component'中的块/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347: ineach_strongly_connected_component'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in tsort_each'来自/app/vendor/ruby-2.3.0/lib/ruby/2.3.0 /tsort.rb:205:intsort_each'来自/ app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in run_initializers'来自/ app / vendor /束/红宝石/ 2.3.0 /宝石/ railties-4.2.5.1 / lib目录/导轨/ application.rb中:352:ininitialize“!来自/app/config/environment.rb:5:in <top(required)>'from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application.rb: 328:inrequire'from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/application.rb:328:in require_environment!'来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:142:inrequire_application_and_environment!'来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:67:in console'来自/app/vendor/bundle/ruby/2.3.0 /gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!”来自/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in <top(required)>'from / app / bin / rails:9: inrequire'from / app / bin / rails:9:in''

2 回答

  • 1

    database.yml 应该适合你

    production:
     adapter: postgresql
     encoding: unicode
     pool: 5
    
    development:
      database: db/development.sqlite3
    
    test:
      database: db/test.sqlite3
    

    但我会建议使用不同的数据库适配器进行开发 .

  • 0
    production:
     <<: *default
     adapter: postgresql
     encoding: unicode
     pool: 5
    
    
    development:
      <<: *default
      database: db/development.sqlite3
    
    test:
      <<: *default
      database: db/test.sqlite3
    

    上面是我的database.yml . 有什么不对吗?

相关问题