Heroku部署:Rails应用程序错误(检测Rails配置失败)

问题描述 投票:0回答:1

我正在尝试将红宝石应用程序部署到Heroku,但是在我的Heroku部署中,我一直收到此消息以及“ Application Error”屏幕。应用程序已部署,但我收到了这些错误消息。任何帮助表示赞赏。我只是想让我的项目显示在实际的网页上。我的Ruby版本是最新的,我认为我不需要Procfile。

remote: ###### WARNING:
remote: 
remote:        Detecting rails configuration failed
remote: 
remote: ###### WARNING:
remote: 
remote:        There is a more recent Ruby version available for you to use:
remote:        
remote:        2.7.1
remote:        
remote:        The latest version will include security and bug fixes, we always recommend
remote:        running the latest version of your minor release.
remote:        
remote:        Please upgrade your Ruby version.
remote:        
remote:        For all available Ruby versions see:
remote:          https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: 
remote: ###### WARNING:
remote: 
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote: 
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote: 
remote: -----> Compressing...
remote:        Done: 56M
remote: -----> Launching...
remote:        Released v12

这是我的有关项目及其部署的构建日志。

2020-05-04T02:29:18.008519+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
2020-05-04T02:29:18.008520+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform'
2020-05-04T02:29:18.008521+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke'
2020-05-04T02:29:18.008523+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands.rb:18:in `<top (required)>'
2020-05-04T02:29:18.008541+00:00 app[web.1]: from bin/rails:4:in `require'
2020-05-04T02:29:18.008541+00:00 app[web.1]: from bin/rails:4:in `<main>'
2020-05-04T02:29:18.099375+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-04T02:29:18.102099+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-04T02:29:29.521757+00:00 app[web.1]: => Booting WEBrick
2020-05-04T02:29:29.521820+00:00 app[web.1]: => Rails 6.0.0 application starting in production http://0.0.0.0:42918
2020-05-04T02:29:29.521830+00:00 app[web.1]: => Run `rails server --help` for more startup options
2020-05-04T02:29:29.825740+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
2020-05-04T02:29:29.825785+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here
2020-05-04T02:29:30.454360+00:00 app[web.1]: Exiting
2020-05-04T02:29:30.510304+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `whitelist_attributes=' for #<Class:0x0000564b8b1c8978> (NoMethodError)
2020-05-04T02:29:30.510309+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/railtie.rb:190:in `block (3 levels) in <class:Railtie>'
2020-05-04T02:29:30.510310+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/railtie.rb:189:in `each'
2020-05-04T02:29:30.510312+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/railtie.rb:189:in `block (2 levels) in <class:Railtie>'
2020-05-04T02:29:30.510334+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:72:in `class_eval'
2020-05-04T02:29:30.510335+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:72:in `block in execute_hook'
2020-05-04T02:29:30.510339+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
2020-05-04T02:29:30.510341+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
2020-05-04T02:29:30.510361+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
2020-05-04T02:29:30.510365+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:51:in `each'
2020-05-04T02:29:30.510367+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
2020-05-04T02:29:30.510369+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/base.rb:327:in `<module:ActiveRecord>'
2020-05-04T02:29:30.510372+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.0/lib/active_record/base.rb:27:in `<top (required)>'
2020-05-04T02:29:30.510392+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510393+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
2020-05-04T02:29:30.510397+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
2020-05-04T02:29:30.510399+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510421+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activestorage-6.0.0/app/models/active_storage/attachment.rb:8:in `<top (required)>'
2020-05-04T02:29:30.510463+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510464+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
2020-05-04T02:29:30.510468+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
2020-05-04T02:29:30.510468+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510490+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:412:in `block in require_or_load'
2020-05-04T02:29:30.510493+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:40:in `block in load_interlock'
2020-05-04T02:29:30.510494+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
2020-05-04T02:29:30.510497+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
2020-05-04T02:29:30.510516+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies/interlock.rb:13:in `loading'
2020-05-04T02:29:30.510520+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:40:in `load_interlock'
2020-05-04T02:29:30.510520+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:390:in `require_or_load'
2020-05-04T02:29:30.510543+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:368:in `depend_on'
2020-05-04T02:29:30.510547+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:280:in `require_dependency'
2020-05-04T02:29:30.510547+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:480:in `block (2 levels) in eager_load!'
2020-05-04T02:29:30.510550+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:479:in `each'
2020-05-04T02:29:30.510570+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:479:in `block in eager_load!'
2020-05-04T02:29:30.510571+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:476:in `each'
2020-05-04T02:29:30.510574+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:476:in `eager_load!'
2020-05-04T02:29:30.510577+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/engine.rb:356:in `eager_load!'
2020-05-04T02:29:30.510608+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/application/finisher.rb:123:in `each'
2020-05-04T02:29:30.510660+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/application/finisher.rb:123:in `block in <module:Finisher>'
2020-05-04T02:29:30.510662+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `instance_exec'
2020-05-04T02:29:30.510662+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `run'
2020-05-04T02:29:30.510663+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
2020-05-04T02:29:30.510664+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
2020-05-04T02:29:30.510668+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2020-05-04T02:29:30.510668+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
2020-05-04T02:29:30.510669+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
2020-05-04T02:29:30.510671+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `each'
2020-05-04T02:29:30.510692+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `call'
2020-05-04T02:29:30.510696+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
2020-05-04T02:29:30.510697+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
2020-05-04T02:29:30.510699+00:00 app[web.1]: from /app/vendor/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
2020-05-04T02:29:30.510719+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/initializable.rb:60:in `run_initializers'
2020-05-04T02:29:30.510723+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/application.rb:363:in `initialize!'
2020-05-04T02:29:30.510723+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `public_send'
2020-05-04T02:29:30.510747+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `method_missing'
2020-05-04T02:29:30.510748+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2020-05-04T02:29:30.510751+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510754+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
2020-05-04T02:29:30.510926+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
2020-05-04T02:29:30.510931+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
2020-05-04T02:29:30.510989+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2020-05-04T02:29:30.510990+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `eval'
2020-05-04T02:29:30.510994+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `new_from_string'
2020-05-04T02:29:30.510995+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/builder.rb:105:in `load_file'
2020-05-04T02:29:30.511015+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/builder.rb:66:in `parse_file'
2020-05-04T02:29:30.511019+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2020-05-04T02:29:30.511020+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:249:in `app'
2020-05-04T02:29:30.511043+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:422:in `wrapped_app'
2020-05-04T02:29:30.511047+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:312:in `block in start'
2020-05-04T02:29:30.511047+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:379:in `handle_profiling'
2020-05-04T02:29:30.511050+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.2/lib/rack/server.rb:311:in `start'
2020-05-04T02:29:30.511070+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:39:in `start'
2020-05-04T02:29:30.511074+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:147:in `block in perform'
2020-05-04T02:29:30.511074+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `tap'
2020-05-04T02:29:30.511094+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `perform'
2020-05-04T02:29:30.511097+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
2020-05-04T02:29:30.511098+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
2020-05-04T02:29:30.511145+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
2020-05-04T02:29:30.511150+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform'
2020-05-04T02:29:30.511152+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke'
2020-05-04T02:29:30.511171+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.0/lib/rails/commands.rb:18:in `<top (required)>'
2020-05-04T02:29:30.511176+00:00 app[web.1]: from bin/rails:4:in `require'
2020-05-04T02:29:30.511176+00:00 app[web.1]: from bin/rails:4:in `<main>'
2020-05-04T02:29:30.613164+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-04T02:29:32.384512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=csci3352-final.herokuapp.com request_id=cdcd8464-c743-4623-b7f4-1f07dbbd5805 fwd="24.8.58.223" dyno= connect= service= status=503 bytes= protocol=https
2020-05-04T02:29:33.019120+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=csci3352-final.herokuapp.com request_id=2de17265-16a8-45fb-88a2-24180ddc8364 fwd="24.8.58.223" dyno= connect= service= status=503 bytes= protocol=https

ruby-on-rails ruby git heroku
1个回答
0
投票

我认为与whitelist_attributes有关你尝试删除config.active_record.whitelist_attributes = true来自config / application.rb吗?

并删除模型类中的所有white_list_attributes。

© www.soinside.com 2019 - 2024. All rights reserved.