# Shipping a gem with jruby.jar

**URL:** <https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009>\
**Category:** Ruby\
**Created:** [March 26, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009 "2009-03-26T21:17:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/1 "2009-03-26T21:17:34Z")

</div>

Is it possible to ship a gem with jruby.jar in a way that jruby  
scripts can access the gem? I’d like to do so in a way that doesn’t  
require installing either ruby or jruby.

BTW, googling variants of ruby, gem, and shipping produces useless  
results.

Juan

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/2 "2009-03-26T22:14:28Z")

</div>

On Mar 26, 2009, at 13:13, Juan Z. wrote:

> Is it possible to ship a gem with jruby.jar in a way that jruby  
> scripts can access the gem? I’d like to do so in a way that doesn’t  
> require installing either ruby or jruby.

You need Ruby to install a gem via RubyGems, so I don’t see how this  
could possibly work.

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:19pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/3 "2009-03-26T22:19:11Z")

</div>

On 26 mars 09, at 17:08, Eric H. wrote:

> On Mar 26, 2009, at 13:13, Juan Z. wrote:
> 
> > Is it possible to ship a gem with jruby.jar in a way that jruby  
> > scripts can access the gem? I’d like to do so in a way that  
> > doesn’t require installing either ruby or jruby.
> 
> You need Ruby to install a gem via RubyGems, so I don’t see how  
> this could possibly work.

So shipping a Ruby application that uses a gem is impossible?

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:22pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/4 "2009-03-26T22:22:08Z")

</div>

On 26 mars 09, at 17:14, Juan Z. wrote:

> So shipping a Ruby application that uses a gem is impossible?

I wonder if it’s possible to write a gem to jar converter.

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/5 "2009-03-26T22:26:50Z")

</div>

On Mar 26, 2009, at 14:14, Juan Z. wrote:

> On 26 mars 09, at 17:08, Eric H. wrote:
> 
> > On Mar 26, 2009, at 13:13, Juan Z. wrote:
> > 
> > > Is it possible to ship a gem with jruby.jar in a way that jruby  
> > > scripts can access the gem? I’d like to do so in a way that  
> > > doesn’t require installing either ruby or jruby.
> > 
> > You need Ruby to install a gem via RubyGems, so I don’t see how  
> > this could possibly work.
> 
> So shipping a Ruby application that uses a gem is impossible?

You said that you want the gem to install without ruby or jruby.  
Without a ruby interpreter, a gem won’t install.

If you already have ruby or jruby, you can use a gem to ship an  
application.

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/6 "2009-03-26T22:32:06Z")

</div>

On Thu, Mar 26, 2009 at 5:18 PM, Juan Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I wonder if it’s possible to write a gem to jar converter.

You may be interested in  
[JRuby 1.1.6: Gems-in-a-jar](http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar).  
Feel free to hop over to the jruby lists if you want to continue the  
discussion.

Cheers,  
/Nick

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:33pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/7 "2009-03-26T22:33:16Z")

</div>

On 26 mars 09, at 17:23, Eric H. wrote:

> > So shipping a Ruby application that uses a gem is impossible?
> 
> You said that you want the gem to install without ruby or jruby.  
> Without a ruby interpreter, a gem won’t install.
> 
> If you already have ruby or jruby, you can use a gem to ship an  
> application.

Sorry for the confusion. I don’t want someone to have to separately  
install Ruby or JRuby. Since JRuby comes in a jar that isn’t a  
problem. I can run a script using just using jruby.jar. What I  
don’t know is how to get such a script to be able to access a gem.

---

<div class="post-metadata">

**Author:** ![juan\_zanos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Post date:** [March 26, 2009, 10:40pm UTC](https://www.ruby-forum.com/t/shipping-a-gem-with-jruby-jar/164009/8 "2009-03-26T22:40:54Z")

</div>

On 26 mars 09, at 17:28, Nick S. wrote:

> Cheers,  
> /Nick

Thanks, I will do that.  
Juan
