# How does gem know to create an executable

**URL:** <https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258>\
**Category:** Ruby\
**Created:** [June 15, 2009, 4:30am UTC](https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258 "2009-06-15T04:30:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [June 15, 2009, 4:30am UTC](https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258/1 "2009-06-15T04:30:17Z")

</div>

I installed gem called gembox and am loving it.

> **[GitHub - quirkey/gembox: A sinatra based interface for browsing and admiring...](https://github.com/quirkey/gembox/tree/master)**
>
> master

When I installed this gem, I got this command called ‘gembox’ for free.

> which gembox  
> /usr/bin/gembox

I am looking at gembox.gemspec and am not able to find any mention of  
executable.

> <https://github.com/quirkey/gembox/blob/0e83224d34734ea2f2d8337f289941902b469a7a/gembox.gemspec>

My question is where in the gem specification it is mentioned that an  
executable should be created and the name of the executable should be  
‘gembox’.

I read the manuals mentioned at [http://rubygems.org/](http://rubygems.org/) but could not get  
what I am looking for.

Thanks

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [June 15, 2009, 4:56am UTC](https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258/2 "2009-06-15T04:56:17Z")

</div>

On Jun 14, 2009, at 19:30 , Raj S. wrote:

> I am looking at gembox.gemspec and am not able to find any mention of  
> executable.  
> [gembox/gembox.gemspec at 0e83224d34734ea2f2d8337f289941902b469a7a · quirkey/gembox · GitHub](http://github.com/quirkey/gembox/blob/0e83224d34734ea2f2d8337f289941902b469a7a/gembox.gemspec)

s.executables = [“gembox”]

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [June 15, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258/3 "2009-06-15T22:08:31Z")

</div>

On Jun 15, 2009, at 07:55, Raj S. wrote:

> Thanks for the response. If I am using hoe, how do I mark something as  
> executable?

Drop a file in bin/ that is executable and Hoe will Do What You Want.

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [June 15, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/how-does-gem-know-to-create-an-executable/170258/4 "2009-06-15T16:55:18Z")

</div>

Hi Ryan,

Thanks for the response. If I am using hoe, how do I mark something as  
executable?
