From: Keith Bennett Date: 2011-08-10T08:38:55+09:00 Subject: Re: bin-file on linux CC - Ruby should be portable across OS's. Can you give us more information about what your goal is, what you've tried, etc.? I think the answer may be not be so difficult. You know you can run a Ruby script by calling the ruby interpreter, right?: ruby myscript.rb If you want it to look like a standalone program in Windows, you could always write a batch file that included the above. - Keith On Mon, Aug 8, 2011 at 10:48 PM, CC Chen wrote: > Chris White wrote in post #1015421: >> On Aug 7, 2011, at 7:32 PM, CC Chen wrote: >> >>> How to convert the script code to bin-file(Linux)? >>> >>> -- >>> Posted via http://www.ruby-forum.com/. >>> >> >> >> It depends on what you wish to accomplish by that. If you just want a >> file that can be run like a binary executable you can always set the >> script as executable (chmod 775 file.rb) and  put a shebang at the top: >> >> #!/usr/bin/env ruby >> >> Assuming you want something that can be installed and setup for the user >> to be run, you can still make the script executable then package it up >> as a gem. See the redcar gem for an example of such a setup. Another >> remote possibility is using JRuby to compile to java class files, throw >> those in a jar, then use something like launch4j as a wrapper. However >> that seems a bit much to achieve your goal. >> >> Regards, >> Chris White >> http://www.twitter.com/cwgem > > > > Could I run the JRuby to java class on windows model and put the class > file to linux model, does it also can run on linux? > > > > Thanks, > > -- > Posted via http://www.ruby-forum.com/. > >