在渲染我的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中的建议,但没有帮助