From: CC Chen Date: 2011-08-09T11:48:19+09:00 Subject: Re: bin-file on linux 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/.