Project

General

Profile

Feature #11028

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

standalone running single file ( zipped archives of ruby code) running **without installation** using "gem install ..." 
 prior examples in other languages: 

     
     python myprg.pyz 
     java -jar myprg.jar 

 Detailed Description: 
 --------------------- 

 
 In python, if i have multiple program files: "`a1.py`, `a2.py`, `__main__.py`, "a1.py, a2.py, __main__.py, 
   `dir1/b1.py`, `dir1/b2.py`" dir1/b1.py, dir1/b2.py" and then i zip it as myprogram1.pyz 
 then i can run it as "python myprogram.pyz" (`__main__.py` (__main__.py inside the zip 
 file will be executed first). It is easy to distribute a single file 
 myprogram1.pyz 

 see: http://blogs.gnome.org/jamesh/2012/05/21/python-zip-files/ 

 --- 
 === 
 in java also we can bundle all the .class files into a single .jar file 
 and run it 

     
   java -jar myprogram1.jar 

 --- 
 ======== 
 Currently in ruby the ".gem" file requires installation using "gem install ...". Then it gives some program file for running. 
 What i am asking is that some    gem file should have manifest with which they can run directly without installing 


 That is, i request you to kind provide a feature in ruby that if i have lots of files like: `a1.rb`, `a2.rb`, `__main__.rb`, `dir1/a4.rb` a1.rb , a2.rb, __main__.rb dir1/a4.rb etc. 
 (say, which uses Ruby-GTK for a Desktop application). Then i should be able to bundle them as zip file, say myprog1.zip or myprog1.pz ( rbz=ruby's rbz 
 =ruby's zipped executable archive). 
 And then i can distribute this "single file" and execute it as: 

     ruby myprog1.rbz 

 This will execute the `__main__.rb` __main__.rb file among all the other .rb files, 
 inside this .zip archive myprog1.rbz    . 
 Note: this .rbz file extension can be .gemz or whatever, but this functionality of "standalone running zipped archives of ruby code running without installation" is essential 

Back