2

In the heroku logs I see the following.

app[web.1]: Started GET "/tags/1" ...
app[web.1]: Processing by TagsController#show as HTML
app[web.1]: Parameters: {"id"=>"1"}
app[web.1]: Tag Load (1.2ms) SELECT "tags".* FROM "tags" WHERE "tags"."id" = 1ドル LIMIT 2ドル [["id", 1], ["LIMIT", 1]]
app[web.1]: Completed 406 Not Acceptable in 7ms (ActiveRecord: 1.2ms)
app[web.1]: ActionController::UnknownFormat (TagsController#show is missing a template for this request format and variant.
app[web.1]: request.formats: ["text/html"]
app[web.1]: request.variant: []

In dev env the page is rendering fine and I don't see the error.

> ls app/views/tags
_form.html.haml new.html.haml show.html.haml

Controller

class TagsController < ApplicationController
 before_action :authenticate_user!, except: :show
 def show
 @tag = Tag.find(params[:id].to_i)
 end
 ...
asked Jun 9, 2017 at 5:04
10
  • 3
    What is request format coming to show action? Seems like it is not HTML. Commented Jun 9, 2017 at 5:16
  • yeah, I'm guessing it's either a JSON or JS request Commented Jun 9, 2017 at 8:41
  • It is HTML. I added more of the log output in the question Commented Jun 9, 2017 at 12:35
  • Ok. It IS HTML. Also I can see you have show.html.haml. Can you confirm it again that show.html.haml is present inside the app/views/tags? Commented Jun 9, 2017 at 12:40
  • 1
    my global gitignore was ignoring the tags dir because that's the same dir name that vim uses for ctags. Error messages do not lie, the views weren't there. Thanks for the help Commented Jun 9, 2017 at 14:15

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.