Googlebot receiving missing template error for an existing template

后端 未结 4 1324
甜味超标
甜味超标 2021-02-01 19:56

In the last couple of days, we have started to receive a missing template error when the google bot attempts to access our main home page (welcome/index). I have been staring at

4条回答
  •  一个人的身影
    2021-02-01 20:57

    The solution to the problem is to specify the format in your action.

    Up until now, I had simply had the following in my index action

    def index
    
    end
    

    Once I inserted a respond_to block

    def index
      respond_to do |format|
        format.html
      end
    end
    

    I stopped getting the missing template errors.

提交回复
热议问题