Sunday, August 12, 2012

Ruby to .exe

I've been wondering how to get these .rb files to run on my computer without me constantly having to go to the command prompt and running them.
After a little searching on the internet I found OCRA. It is a gem that you install with the instructions you can find on their website. Then you open up the command prompt or 'Command prompt with Ruby', navigate to the folder in which you have the .rb file(s) you wish to create .exe from and enter this line:
ocra filename.rb
replace filename.rb with your own .rb file.
This is all. It will run through your application and it will create a .exe file for you. You can now run it, send it to friends, sell it, whatever you want. It even creates a nice ruby icon. 

No comments:

Post a Comment