[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Question: Ruby application packaging

Cameron, Gemma (UK)

10/11/2006 8:44:00 AM


Try rubysript2exe. It's extremely easy to use in my opinion. ( : Just
what I wanted/needed, maybe it could be for you too...?

http://www.erikveen.dds.nl/rubyscript2exe/...

In case you're getting too bogged down trudging through that document.
This packages up all the bits of ruby and the gems that you have used,
but if you have used tk then try the parameter --rubyscript2exe-tk
below:

*** Please accept my apologies for any poor formatting below... ***


1. Place all required files in a folder and rename the entry point
of your application to init.rb. RubyScript2Exe complains if it can't
find application/init.rb.
a. Note: If the extension is "rb", a DOS box will pop up. If the
extension is "rbw", no DOS box will pop up. Unless it is overwritten by
a parameter.
2. Open a command prompt where the rubyscript2exe.rb file is
located and use:


c:\home\erik> ruby rubyscript2exe.rb application.rb[w] [parameters]
or
c:\home\erik> ruby rubyscript2exe.rb application[/] [parameters]

EXAMPLE: c:\ruby\bin> ruby rubyscript2exe.rb c:/scriptmigration/
--rubyscript2exe-tk


Parameter Description
--rubyscript2exe-rubyw Avoid the popping up of a DOS box. (It's
annoying in the test
period... No puts and p
anymore... Only use it for
distributing your application.
See Logging.)
--rubyscript2exe-ruby Force the popping up of a DOS box
(default).
--rubyscript2exe-nostrip Avoid stripping. The binaries (ruby and
*.so) on Linux and Darwin
are stripped by default to
reduce the size of the
resulting executable.
--rubyscript2exe-strace Start the embedded application with
strace (Linux only, for debugging only).
--rubyscript2exe-tk (experimental) Embed not only the Ruby
bindings for TK, but TK itself as well.
--rubyscript2exe-verbose Verbose mode.
--rubyscript2exe-quiet Quiet mode.

When using --rubyscript2exe-tk, it's probably a good idea to add exit if
RUBYSCRIPT2EXE.is_compiling? (see is_compiling?) just before
Tk.mainloop:

Gem

-----Original Message-----
From: list-bounce@example.com [mailto:list-bounce@example.com] On Behalf
Of Tadatoshi Takahashi
Sent: 11 October 2006 06:31
To: ruby-talk ML
Subject: Question: Ruby application packaging

*** WARNING ***

This mail has originated outside your organization, either from an
external partner or the Global Internet.
Keep this in mind if you answer this message.

I have a trivial question.

I would like to package a Ruby application and run it.
What is the convention in Ruby to do so?

I tried Gem.
I could generate Gem and successfully install it locally.
But I don't know how to add executable file like .bat file like you can
do when you install Rake by Gem.
Is there a way to auto-generate executable file by Gem or Rake?
(And how do you make Gem add executable file under ruby/bin? Or is it a
feasible approach?) If not, is there a convention in Ruby about how to
execute an application installed as Gem?
Or is there any other packaging option?

Thank you.

Tadatoshi

--
Posted via http://www.ruby-....





********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************