ruby-on-rails – Rails 5 DEPRECATION警告:不推荐使用常量访问mime类型

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Rails 5 DEPRECATION警告:不推荐使用常量访问mime类型前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
安装Rails 5.认为事情很好,但无法创建数据库或启动服务器.我收到此错误

DEPRECATION WARNING: Accessing mime types via constants is deprecated.
Please change:

Mime::HTML

to:

Mime[:html] . (called from at
/usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/request.rb:7)
DEPRECATION WARNING: Accessing mime types via constants is deprecated.
Please change:

Mime::TEXT

to:

Mime[:text] . (called from at
/usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/request.rb:7)
DEPRECATION WARNING: Accessing mime types via constants is deprecated.
Please change:

Mime::URL_ENCODED_FORM

to:

Mime[:url_encoded_form] . (called from at
/usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/request.rb:7)

不太清楚在这做什么.不确定在哪里更改Mime :: HTML.关于我为什么会收到此错误的任何想法?或者如何修复它?

解决方法

更改Gemfile: gem’web-console’,’〜> 3.0′ 捆绑更新
原文链接:https://www.f2er.com/ruby/269068.html

猜你在找的Ruby相关文章