[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby file to Executable file -- for all OS

Raveendran Jazzez

2/9/2009 6:02:00 AM

Hi All,

I have a ruby script. i converted it into exe with the help of
rubyscript2exe gem. But it was working in windows machines only..

My Need:

I want to run all the Operating systems. is this possible ?
(I hope some gems will be available)



Thanks in advance,
P.Raveendran
http://raveendran.wor...
--
Posted via http://www.ruby-....

9 Answers

Raveendran Jazzez

2/10/2009 9:06:00 AM

0


Hi All,

So there is no way to do that ..?

Right.. ? ok I am trying to find out others ways ..


Thanks,
P.Raveendran
http://raveendran.wor...

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

David Masover

2/10/2009 9:26:00 AM

0

jazzez ravi wrote:
> I have a ruby script. i converted it into exe with the help of
> rubyscript2exe gem.
>
> I want to run all the Operating systems. is this possible ?
> (I hope some gems will be available)
>
...
> So there is no way to do that ..?
>

It might be your English... I mean no offense, it's just difficult to
understand. Do you mean, you want to create a single executable for each
operating system Ruby runs on? So I can just download your program on OS
X, or on Linux, without having Ruby installed?

Probably not.

Mostly there's no need. Worse, it's a bad idea, and will probably make
your users hate you.

Let me put it this way: Suppose your app is a few hundred kilobytes. My
current installation of Ruby is at least five and a half megabytes
(probably more), and that's not counting any rubygems you include. My
current Rubygems folder is over six hundred megabytes.

So, what would be a few seconds, or near instantaneous, is now several
minutes or hours. But I already have Ruby installed, and probably many
of the gems I would need, so it's a complete waste.

If you want to distribute your app in the friendliest way, that makes it
easiest for users of any OS to install it, build a gem. There's a
reasonably easy way to install Ruby and Rubygems on any OS, and once
that's there, it's easy to install your gem.


It's also possible I misread, and you actually want a single .exe file
which can run on all operating systems -- also, presumably, without
asking your users to install anything first. That is impossible -- those
files are for Windows only, except the .NET ones, and only Windows comes
with .NET out of the box.

Raveendran Jazzez

2/10/2009 9:45:00 AM

0

David Masover wrote:
>
> It's also possible I misread, and you actually want a single .exe file
> which can run on all operating systems -- also, presumably, without
> asking your users to install anything first. That is impossible --


Thanks David.

regards,
P.Raveendran
http://raveendran.wor...
http://rubyforge.org/proje...

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

Louis-Philippe

2/10/2009 1:43:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

there is rubyscript2exe which would do it for windows at least:
http://www.erikveen.dds.nl/rubys...

also, Shoes would do it for almost all platform (3 big at least)
http://sh...
but then you have a Shoes app, and not a ruby script.

2009/2/10 jazzez ravi <jazzezravi@gmail.com>

> David Masover wrote:
> >
> > It's also possible I misread, and you actually want a single .exe file
> > which can run on all operating systems -- also, presumably, without
> > asking your users to install anything first. That is impossible --
>
>
> Thanks David.
>
> regards,
> P.Raveendran
> http://raveendran.wor...
> http://rubyforge.org/proje...
>
> --
> Posted via http://www.ruby-....
>
>

David Masover

2/16/2009 9:00:00 AM

0

Chad Perrin wrote:
> Generally, I think the best way to do it is to provide several different
> ways to install stuff, if you want cross-platform easy installs and your
> userbase will consist of more than just Ruby programmers.
>

I suppose that is best for brand-new users. However, it is a lot of
work, and it means there may be some confusion as to which version is
the latest, and how to keep up to date.

Generally, even as a user, I find that I would much rather have a few
lines to paste into the terminal -- even better if I understand them --
than have to download something, find it, doubleclick on it, and maybe
still have to type a few lines in the terminal.

For example, I would tell Ubuntu Intrepid users to do this:

sudo apt-get install rubygems
sudo gem intsall myapp

Or maybe, even better:

sudo sh -c 'apt-get install rubygems && gem install myapp'

Quicker for the user, probably quicker for the developer.

David Masover

2/16/2009 11:36:00 PM

0

Chad Perrin wrote:
> On Mon, Feb 16, 2009 at 05:59:39PM +0900, David Masover wrote:
>
>> Chad Perrin wrote:
>>
>>> Generally, I think the best way to do it is to provide several different
>>> ways to install stuff, if you want cross-platform easy installs and your
>>> userbase will consist of more than just Ruby programmers.
>>>
>>>
>> I suppose that is best for brand-new users. However, it is a lot of
>> work, and it means there may be some confusion as to which version is
>> the latest, and how to keep up to date.
>>
>
> Not just new users -- non-technical users in general.
>

Non-technical users in general would benefit even more from a good
package management system. Much easier to run a 'gem update', even if
you have to use that scary, scary commandline, than it is to go find the
website, compare the versions, uninstall the old one, download the new
one, and install it all over again.

>> Generally, even as a user, I find that I would much rather have a few
>> lines to paste into the terminal -- even better if I understand them --
>> than have to download something, find it, doubleclick on it, and maybe
>> still have to type a few lines in the terminal.
>>
>
> I agree -- but then, I'm a technically oriented user on an OS that
> basically just installs gems for me. I'm not a non-technical user on MS
> Windows.
>

On MS Windows, probably the best advice would be to find a one-click
application which installs Ruby and Rubygems, and then provide the same
instructions -- open a terminal and type 'gem install myapp'. Ideally,
you'd have a script (a batchfile?) which checks for the existence of
Rubygems, downloads it if needed, and then downloads your app...

I would suggest that the right approach is to fix usability problems
with Rubygems (or replace it with something better?), rather than having
each app have to solve these same problems all over again.

And let's not forget, everywhere but Windows, there are a few commands
that would work for that initial installation. Only on Windows do we
need anything elaborate.

Jarmo Pertman

2/27/2009 1:34:00 PM

0

Louis-Philippe wrote:
> there is rubyscript2exe which would do it for windows at least:
> http://www.erikveen.dds.nl/rubys...

Sorry for bringing up old thread, but how come you didn't notice on
rubyscript2exe web page: "RubyScript2Exe transforms your Ruby
application into a standalone, compressed Windows, Linux or Mac OS X
(Darwin) executable."

The only thing is that you have to make this executable on all of these
OS-es separately. So, you run rubyscript2exe in Linux and in Windows and
you get 2 different executables - one for Linux, other for Windows. As
it's normally almost with every other applications.

Anyway, you should give it a try. Since it includes all the necessary
libraries for your application + Ruby itself, then there's no need to
install Ruby specifically, which makes it a lot easier for non-techy
people to use your application.

Also, when I tried to create .exe on Windows (I had quite small Ruby
application), it's size was about 2MB - nothing significant in today's
world, is it?

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

Raveendran Jazzez

2/28/2009 4:59:00 AM

0


Hi Jarmo Pertman,

Its great idea from you. I will try and let you know the result.

Thanks
P.Raveendran
http://raveendran.wor...
--
Posted via http://www.ruby-....

Ian Trudel

2/28/2009 5:54:00 AM

0

Wouldn't be crate a good candidate? I haven't tried it yet but it seems
to do exactly what the first post ask for. Any crate user here anyway?
It would be interesting to hear more about it.

http://www.copiousfreetime.org/articles/2008/11/30/package-an-application-with-...
--
Posted via http://www.ruby-....