# Flickr.rb - displaying tags

**URL:** <https://www.ruby-forum.com/t/flickr-rb-displaying-tags/82606>\
**Category:** Rails\
**Created:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/flickr-rb-displaying-tags/82606 "2007-01-19T16:31:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmacgregor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e9a140/32.png) [@gmacgregor](https://www.ruby-forum.com/u/gmacgregor)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/flickr-rb-displaying-tags/82606/1 "2007-01-19T16:31:37Z")

</div>

Maybe I’m having a “slow day” but I can’t for the life of me figure out  
how to print a photo’s tags using the flickr gem (flickr.rb). Consider  
this:

\<% @photos.each do |photo| %\>  
Tags: \<%= debug(photo.tags) %\>  
\<% end %\>

…Gives the following output:

tag:

- authorname: gmacgregor  
author: 62682519@N00  
id: 4181224-280985155-130  
content: family  
raw: family
- authorname: gmacgregor  
author: 62682519@N00  
id: 4181224-280985155-278  
content: portrait  
raw: portrait
- authorname: gmacgregor  
author: 62682519@N00  
id: 4181224-280985155-3840  
content: child  
raw: child

How the heck to I traverse this? I’ve tried the following as well as a  
few other variations but nothing seems to work:

\<% @photos.each do |photo| %\>  
Tags: \<% photo.tags.each do |tag| %\>\<%= tag[‘raw’] %\>\<% end %\>  
\<% end %\>

Ideas? Many thanks…

---

<div class="post-metadata">

**Author:** ![gmacgregor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e9a140/32.png) [@gmacgregor](https://www.ruby-forum.com/u/gmacgregor)\
**Post date:** [April 1, 2007, 4:00am UTC](https://www.ruby-forum.com/t/flickr-rb-displaying-tags/82606/2 "2007-04-01T04:00:33Z")

</div>

Excuse me for digging up an old thread. However, i’ve been experiencing  
the same issue with Flickr.rb and searched endlessly for an answer.

Still can’t seem to pull the tags for a specified image without the  
format looking like the output above. Anyone have any advice on this?
