在rails 5升级后,Rails Server在主页上产生错误

时间:2017-02-26 07:02:06

标签: ruby-on-rails ruby-on-rails-5 rails-upgrade

我试图从rails 4.2升级到5.我的ruby版本和rails版本现在都升级了,我试图通过我认为是大多数升级步骤。当我运行rails服务器时,服务器将启动,但是当我访问localhost:3000时,浏览器会抛出错误。

奇怪的是终端/日志根本不会抛出任何错误。我在日志中看到了这一点:

iMac:appDirectory name$ rails server
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users//.rvm/gems/ruby-2.4.0@global/gems/gretel-3.0.8/lib/gretel/deprecated/default_style_key.rb:10)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users//.rvm/gems/ruby-2.4.0@global/gems/gretel-3.0.8/lib/gretel/deprecated/show_root_alone.rb:11)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users//.rvm/gems/ruby-2.4.0@global/gems/gretel-3.0.8/lib/gretel/deprecated/yield_links.rb:19)
DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::HTML` to `Mime[:html]`. (called from <class:Request> at /Users//.rvm/gems/ruby-2.4.0@global/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 <class:Request> at /Users//.rvm/gems/ruby-2.4.0@global/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 <class:Request> at /Users//.rvm/gems/ruby-2.4.0@global/gems/web-console-2.2.1/lib/web_console/request.rb:7)
=> Booting WEBrick
=> Rails 5.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
[2017-02-26 00:51:50] INFO  WEBrick 1.3.1
[2017-02-26 00:51:50] INFO  ruby 2.4.0 (2016-12-24) [x86_64-darwin15]
[2017-02-26 00:51:50] INFO  WEBrick::HTTPServer#start: pid=xxxxx port=3000
Started GET "/" for ::1 at 2017-02-26 00:51:57 -0600

我相信这可能只是我忘记的事情(并且与rails 5升级无关)但我有点难过,因为我看不到任何错误消息,即使localhost:3000抛出:

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

感谢您的帮助......

1 个答案:

答案 0 :(得分:0)

按照Shabini的评论更新web-console gem就可以了。