相关疑难解决方法(0)

如何使用 Ruby 2.7.0 修复 Rails 的警告消息

有没有人解决这个问题Ruby 2.7.0

我使用rbenv并安装了 Ruby v2.7.0,然后使用Rails v6.0.2.1.

目前,通过运行其中之一

rails s
rails s -u puma
rails s -u webrick
Run Code Online (Sandbox Code Playgroud)

服务器已启动并且站点已提供服务,但在Console日志中我看到两条警告消息:

local:~/rcode/rb27$ rails s
=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
.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
.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
Puma starting in single …
Run Code Online (Sandbox Code Playgroud)

ruby warnings ruby-on-rails ruby-on-rails-6 ruby-2.7

55
推荐指数
3
解决办法
3万
查看次数