{"action":"created","issue":{"url":"https://api.github.com/repos/rails/jbuilder/issues/306","labels_url":"https://api.github.com/repos/rails/jbuilder/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/rails/jbuilder/issues/306/comments","events_url":"https://api.github.com/repos/rails/jbuilder/issues/306/events","html_url":"https://github.com/rails/jbuilder/issues/306","id":116473011,"number":306,"title":"Rails not loading my show.json.jbuilder file","user":{"login":"iDev0urer","id":4535422,"avatar_url":"https://avatars.githubusercontent.com/u/4535422?v=3","gravatar_id":"","url":"https://api.github.com/users/iDev0urer","html_url":"https://github.com/iDev0urer","followers_url":"https://api.github.com/users/iDev0urer/followers","following_url":"https://api.github.com/users/iDev0urer/following{/other_user}","gists_url":"https://api.github.com/users/iDev0urer/gists{/gist_id}","starred_url":"https://api.github.com/users/iDev0urer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iDev0urer/subscriptions","organizations_url":"https://api.github.com/users/iDev0urer/orgs","repos_url":"https://api.github.com/users/iDev0urer/repos","events_url":"https://api.github.com/users/iDev0urer/events{/privacy}","received_events_url":"https://api.github.com/users/iDev0urer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T03:39:52Z","updated_at":"2015-12-03T07:39:43Z","closed_at":null,"body":"I have been trying to get Rails to load my `show.json.jbuilder` file by itself, but the only way I am able to get it working for now is by including a `render '/users/show.json.jbuilder'` line in my User controller. The error I'm getting is:\r\n\r\n``` \r\nMissing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:\r\n```\r\n\r\nAs you can see it is looking for jbuilder, but for some reason it isn't finding it. As soon as I change my show method to:\r\n\r\n```\r\ndef show\r\n    @user = User.find(params[:id])\r\n    render 'users/show.json.jbuilder'\r\n  end\r\n```\r\n\r\nit works. Any ideas?"},"comment":{"url":"https://api.github.com/repos/rails/jbuilder/issues/comments/161542037","html_url":"https://github.com/rails/jbuilder/issues/306#issuecomment-161542037","issue_url":"https://api.github.com/repos/rails/jbuilder/issues/306","id":161542037,"user":{"login":"awkerney","id":362465,"avatar_url":"https://avatars.githubusercontent.com/u/362465?v=3","gravatar_id":"","url":"https://api.github.com/users/awkerney","html_url":"https://github.com/awkerney","followers_url":"https://api.github.com/users/awkerney/followers","following_url":"https://api.github.com/users/awkerney/following{/other_user}","gists_url":"https://api.github.com/users/awkerney/gists{/gist_id}","starred_url":"https://api.github.com/users/awkerney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awkerney/subscriptions","organizations_url":"https://api.github.com/users/awkerney/orgs","repos_url":"https://api.github.com/users/awkerney/repos","events_url":"https://api.github.com/users/awkerney/events{/privacy}","received_events_url":"https://api.github.com/users/awkerney/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T07:39:43Z","updated_at":"2015-12-03T07:39:43Z","body":"From what I can tell (with limited Rails experience) by default Rails looks for an .html.erb file and isn't finding one. I think the following should help  http://api.rubyonrails.org/classes/ActionController/MimeResponds.html#method-i-respond_to\r\n\r\n```ruby\r\ndef show\r\n  @user = User.find(params[:id])\r\n   respond_to do |format|\r\n      format.json\r\n   end\r\nend\r\n```"}}