# Compiling Ruby Scripts (Ruby 1.9.x)

**URL:** <https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696>\
**Category:** Ruby\
**Created:** [November 20, 2008, 7:58am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696 "2008-11-20T07:58:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [November 20, 2008, 7:58am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/1 "2008-11-20T07:58:55Z")

</div>

I was wondering if it is possible to compile Ruby code for Ruby 1.9.x .  
I understand that by compile, it just packages the interpreter/VM and  
all included libraries, into one huge executable. Does RubyScript2Exe  
support Ruby 1.9.x? If not, are there any alternatives that do?

---

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [November 20, 2008, 8:11am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/2 "2008-11-20T08:11:17Z")

</div>

Sparky M. wrote:

> I was wondering if it is possible to compile Ruby code for Ruby 1.9.x .  
> I understand that by compile, it just packages the interpreter/VM and  
> all included libraries, into one huge executable. Does RubyScript2Exe  
> support Ruby 1.9.x? If not, are there any alternatives that do?

JRuby will have 1.9 support soon, and supports precompilation and  
packaging/bundling the code in a single jar file. Is that what you’re  
looking for?

- Charlie

---

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [November 20, 2008, 12:46pm UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/3 "2008-11-20T12:46:17Z")

</div>

On Nov 20, 2008, at 1:55 AM, Sparky M. wrote:

> I was wondering if it is possible to compile Ruby code for Ruby  
> 1.9.x .  
> I understand that by compile, it just packages the interpreter/VM and  
> all included libraries, into one huge executable. Does RubyScript2Exe  
> support Ruby 1.9.x? If not, are there any alternatives that do?

If you are deploying to OS X, MacRuby’s HotCocoa library has a built-  
in rake task that handles the packaging for you. See:  
[http://lists.macosforge.org/pipermail/macruby-devel/2008-November/000745.html](http://lists.macosforge.org/pipermail/macruby-devel/2008-November/000745.html)

- Josh

---

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [November 21, 2008, 1:17am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/4 "2008-11-21T01:17:12Z")

</div>

Charles Oliver N. wrote:

> - Charlie

Hi Charlie,

Can you guess (estimate) as to “how soon” for packaging as a single jar?

Regards  
Paul F.

---

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [November 21, 2008, 2:16am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/5 "2008-11-21T02:16:49Z")

</div>

Paul F. wrote:

> > - Charlie
> 
> Hi Charlie,
> 
> Can you guess (estimate) as to “how soon” for packaging as a single jar?

Rawr basically does this already:

[http://rawr.rubyforge.org/](http://rawr.rubyforge.org/)

We hope to have 1.9 support all finished by Christmas time or so.  
Parser/interpreter work is in progress, M17N is well under way, and I’ll  
do the compiler after the parser’s done.

- Charlie

---

<div class="post-metadata">

**Author:** ![sparkymat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@sparkymat](https://www.ruby-forum.com/u/sparkymat)\
**Post date:** [February 26, 2009, 7:55am UTC](https://www.ruby-forum.com/t/compiling-ruby-scripts-ruby-1-9-x/153696/6 "2009-02-26T07:55:55Z")

</div>

> We hope to have 1.9 support all finished by Christmas time or so.  
> Parser/interpreter work is in progress, M17N is well under way, and I’ll  
> do the compiler after the parser’s done.
> 
> - Charlie

So the compiled package (rwar file) runs on JRuby?

And, are there any solutions for the official Ruby 1.9 stream?
