# Showing a file

**URL:** <https://www.ruby-forum.com/t/showing-a-file/158303>\
**Category:** Ruby\
**Created:** [January 21, 2009, 9:24pm UTC](https://www.ruby-forum.com/t/showing-a-file/158303 "2009-01-21T21:24:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 21, 2009, 9:24pm UTC](https://www.ruby-forum.com/t/showing-a-file/158303/1 "2009-01-21T21:24:55Z")

</div>

I am a noob in programing, and have just learned some of the basics.

And i wonder if i could show a file (like a picture) when running the  
program??.

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 21, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/showing-a-file/158303/2 "2009-01-21T22:28:53Z")

</div>

Sigge Sg wrote:

> I am a noob in programing, and have just learned some of the basics.
> 
> And i wonder if i could show a file (like a picture) when running the  
> program??.

yes…

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 21, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/showing-a-file/158303/3 "2009-01-21T23:05:39Z")

</div>

Ilan B. wrote:

> Sigge Sg wrote:
> 
> > I am a noob in programing, and have just learned some of the basics.
> > 
> > And i wonder if i could show a file (like a picture) when running the  
> > program??.
> 
> yes…

How??

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 22, 2009, 3:11am UTC](https://www.ruby-forum.com/t/showing-a-file/158303/4 "2009-01-22T03:11:08Z")

</div>

Sigge Sg wrote:

> How??

By using a GUI library. And for which one, it depends of your needs…

But if you just want to display a picture, the asiest way would be Shoes  
I guess.

Shoes.app do  
image “foo/bar.jpg”  
end

But I guess the question is too vague to answer accurately

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 22, 2009, 9:13am UTC](https://www.ruby-forum.com/t/showing-a-file/158303/5 "2009-01-22T09:13:12Z")

</div>

Sigge Sg wrote:

> can i display any picture with the Shoe library??

At least for PNG, JPEG or GIF format, yes.  
You can even make it point to an image on the net.

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 22, 2009, 8:06am UTC](https://www.ruby-forum.com/t/showing-a-file/158303/6 "2009-01-22T08:06:06Z")

</div>

> By using a GUI library. And for which one, it depends of your needs…
> 
> But if you just want to display a picture, the asiest way would be Shoes  
> I guess.
> 
> Shoes.app do  
> image “foo/bar.jpg”  
> end
> 
> But I guess the question is too vague to answer accurately

can i display any picture with the Shoe library??

---

<div class="post-metadata">

**Author:** ![siggesg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9a140/32.png) [@siggesg](https://www.ruby-forum.com/u/siggesg)\
**Post date:** [January 22, 2009, 5:37pm UTC](https://www.ruby-forum.com/t/showing-a-file/158303/7 "2009-01-22T17:37:10Z")

</div>

Sorry! i didn’t understand the code.

I know i’m a noob.

What should I write if i wanna display a picture named “lol.JPEG” from  
the “my picture” folder??
