路由错误在我的Rails 5.0项目中将主页呈现延迟了3.5秒

时间:2016-08-08 09:37:30

标签: ruby-on-rails

在渲染我的Rails 5.0项目的主页时,页面最终加载正常,但我在rails控制台中获得以下日志:

 Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-

5.0.0
lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
(0.0ms)
 Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0
lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within
escues/layout (3569.4ms)

我的观点在

  

网站/ menu.html.erb

我的路线:

   C:\Users\verbeekr\Dev\autotrader>rails routes
Prefix Verb URI Pattern Controller#Action
  root GET  /           site#menu

我的控制器:

class SiteController < ApplicationController

def menu
    @events = Event.get_todays_events
end

我已经尝试在development.rb文件中设置它:

config.assets.debug = false

根据Diagnosing the cause of slow view rendering中的建议,但没有帮助

0 个答案:

没有答案