LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2012, 03:41 PM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
how do i create an executable from a ruby script


I am writing some ruby programs and I don't want anyone to see the source of the program, So I want to compile the ruby scripts into executabes that have the code hidden from users like c++ and java does when you compile it, Is there at least a way to make ruby source code hidden but make the program able to successfully be executable for users that aren't root because when you make the ruby code hidden with the chmod command it is no longer able to run as a regular user, only root I want the code to be hidden and able to be executed by regular users
 
Old 10-25-2012, 08:34 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Try rubyscript2exe .. for these kinds of things you want to search for '<language> obfuscation'
 
Old 10-26-2012, 01:29 PM   #3
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
I did search for some ruby obfuscators but all i am getting is ruby2exe which is a windows tool. I want a tool that will obfuscate the ruby script for use in linux mahcines
 
Old 10-26-2012, 01:44 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by baronobeefdip View Post
I did search for some ruby obfuscators but all i am getting is ruby2exe which is a windows tool.
I would guess that is because security through obscurity a Windows way of thinking and usually a bad idea. May i ask why you want to obscure the code in the first place?
 
Old 10-26-2012, 01:53 PM   #5
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
Because I plan on releasing a program that was made in ruby and I don't want anyone to see the source code, there are things that I can do in ruby that are very complicated and hard to do in languages like C++. I just want to make my ruby source hidden but able to execute without root privelages.

I just tried the ruby program you referred me to and ran the Linux one (the exe in the title threw me off) ahnd I get an error. here is the error
Code:
rubyscript2exe.rb:621:in `replace': can't modify frozen String (RuntimeError)
	from rubyscript2exe.rb:621:in `block in <main>'
	from rubyscript2exe.rb:577:in `block in newlocation'
	from rubyscript2exe.rb:505:in `block in newlocation'
	from rubyscript2exe.rb:472:in `newlocation'
	from rubyscript2exe.rb:505:in `newlocation'
	from rubyscript2exe.rb:577:in `newlocation'
	from rubyscript2exe.rb:619:in `<main>'
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby on Rails - create tables Ephracis Programming 4 02-23-2009 09:44 AM
How to create an executable script that starts execution at a specific date and time? jtag Linux - General 3 08-12-2008 08:36 PM
LXer: How to Create Many to Many Relationships in Ruby on Rails LXer Syndicated Linux News 0 07-08-2007 03:16 AM
C compilers cannot create executable enthusiac Linux - Software 3 05-08-2007 12:37 PM
[Ruby] Tar'ing or Zip'ing with ruby script lmcilwain Programming 2 01-19-2007 06:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration