运行服务器时Rails 6为空白页



在rails 5中进行开发后,我转到了rails 6,在运行rails服务器时遇到了一个错误。当我去localhost://3000浏览器显示的是一个空白页面,没有其他内容。有人有同样的问题吗?重要提示:这个空白页是在我安装了带纱线的引导程序后开始显示的。PD:我使用工头来运行puma并编译webpacker,但rails的命令也是如此

以下是来自服务器的日志:

10:07:50 web.1       | started with pid 11365
10:07:50 webpacker.1 | started with pid 11366
10:07:52 web.1       | Puma starting in single mode...
10:07:52 web.1       | * Version 4.3.1 (ruby 2.7.0-p0), codename: Mysterious Traveller
10:07:52 web.1       | * Min threads: 5, max threads: 5
10:07:52 web.1       | * Environment: development
10:07:57 webpacker.1 | ℹ 「wds」: Project is running at http://localhost:3035/
10:07:57 webpacker.1 | ℹ 「wds」: webpack output is served from /packs/
10:07:57 webpacker.1 | ℹ 「wds」: Content not from webpack is served from /home/enzo/Ruby/Rails/Aguara/aguara/public/packs
10:07:57 webpacker.1 | ℹ 「wds」: 404s will fallback to /index.html
10:08:06 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:06 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here
10:08:07 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:07 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
10:08:08 web.1       | * Listening on tcp://0.0.0.0:5000
10:08:08 web.1       | Use Ctrl-C to stop
10:08:16 webpacker.1 | ℹ 「wdm」: Hash: c16cbbe009c350199791
10:08:16 webpacker.1 | Version: webpack 4.41.5
10:08:16 webpacker.1 | Time: 18836ms
10:08:16 webpacker.1 | Built at: 05/04/2020 10:08:16 AM
10:08:16 webpacker.1 |                                           Asset       Size            Chunks                         Chunk Names
10:08:16 webpacker.1 |          js/application-64644ee2e024eff1d7f7.js   1.72 MiB       application  [emitted] [immutable]  application
10:08:16 webpacker.1 |      js/application-64644ee2e024eff1d7f7.js.map   1.89 MiB       application  [emitted] [dev]        application
10:08:16 webpacker.1 |     js/bootstrap_custom-4a75b3f7b43b52ae2490.js    929 KiB  bootstrap_custom  [emitted] [immutable]  bootstrap_custom
10:08:16 webpacker.1 | js/bootstrap_custom-4a75b3f7b43b52ae2490.js.map   1.04 MiB  bootstrap_custom  [emitted] [dev]        bootstrap_custom
10:08:16 webpacker.1 |                                   manifest.json  738 bytes                    [emitted]              
10:08:16 webpacker.1 | ℹ 「wdm」: Compiled successfully.
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/rotator.rb:28: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/rotator.rb:6: warning: The called method `initialize' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.1/lib/action_view/unbound_template.rb:24: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.1/lib/action_view/template.rb:130: warning: The called method `initialize' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/translation.rb:67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/i18n-1.7.0/lib/i18n.rb:179: warning: The called method `translate' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/abstract_controller/helpers.rb:67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_controller/metal/request_forgery_protection.rb:313: warning: The called method `form_authenticity_token' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/railties/collection_cache_association_loading.rb:7: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/railties/collection_cache_association_loading.rb:12: warning: The called method `relation_from_options' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:119: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:78: warning: The called method `find_asset' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/cookies.rb:635: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:150: warning: The called method `encrypt_and_sign' is defined here
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:175: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1       | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/metadata.rb:17: warning: The called method `wrap' is defined here

这是chrome中的网络选项卡:在此处输入图像描述

经过一次艰难的调试,我终于发现yield标签是问题所在,现在我的应用程序又开始工作了哈哈

相关内容

  • 没有找到相关文章

最新更新