This community-built FAQ covers the “Show a tag” exercise from the lesson “Associations I”.
Paths and Courses
This exercise can be found in the following Codecademy content:
Learn Ruby on Rails
FAQs on the exercise Show a tag
There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (
) below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply (
) below!
Agree with a comment or answer? Like (
) to up-vote the contribution!
Need broader help or resources? Head here.
Looking for motivation to keep learning? Join our wider discussions.
Learn more about how to use this guide.
Found a bug? Report it!
Have a question about your account or billing? Reach out to our customer support team!
None of the above? Find out where to ask other questions here!
When I run this step, I get an error after adding to the Tags controller.
Missing template tags/show, application/show with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
* “#RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x0000000475e7d0“
2 Likes
show.html.erb was already created for us. Since Rails was not finding the file, delete the original file, create a new show.html.erb file with the same contents. It solved the issue for me!
5 Likes
I was having the same issue and that did it for me as well just deleting and recreating the show.html.erb file and pasting in the content from the original.
Yup, same. Copy the existing show.html.erb file, delete it, recreate it.
<% @destinations.each do |d| %>
< div class=“card col-xs-4”>
<%= image_tag d.image %>
< h2><%= d.name %>
< p><%= d.description %>< /p> (remove blank spaces from all tags to get the original code)
< /div>
<% end %>
works
Yeah the looping step on both this and the previous exercises are not the best versions of this unit. I am optimistic with enough people getting confused it will get better.
Also did anyone else have two identical show.html.erb?? As far as I can tell they are EXACTLY the same but one of them I did the exercise on and the other is back at start.
I moved on to the next step and grabbed the code from the show.html.erb and I’m not certain it will work because it looks remarkably similar to the code I wrote and got a Nil Class error over the iterating line. I assume it’s my fault but it’s certainly boggling. I mean its not miles different from the @tag loop they had us do in the previous example but 
<% @destinations.each do |d| %>
<%= image_tag d.image %>
<%= d.name %>
<%= d.description %>
<% end %>
The same issue persists. Deleting the file and replacing it does the trick.
Hi all,
Regarding Step 3:
Why must image_tag be included in the third line of the code below? What is it/what does it do?
<% @destinations.each do |d| %>
<div class="card col-xs-4">
<%= image_tag d.image %>
<h2><%= d.name %></h2>
<p><%= d.description %></p>
</div>
<% end %>
The issue Missing template tags/show
still remains, and the trick to delete and recreate the file still works.
Issue still exist. In my case, the file show.html.erb neither created nor existing. I need to manually create the file, but I still stuck at next step since I don’t know the original html content.
Quite disappointing about this course, so many issue like this.