Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I put my ruby code into a gem, is its source code secure?

Its my understanding that when I make a gem I'm compiling my ruby code into some form of executable, right? Does this mean that unless someone used introspection techniques (which is an acceptable risk to me), my source code is secure?

like image 251
boulder_ruby Avatar asked Sep 10 '26 06:09

boulder_ruby


1 Answers

A gem is not a compiled executable. It's not compiled at all. Ruby is interpreted. Creating a gem just bundles the necessary files together, much like a zip file or tar archive.

If you want your gem secure you should keep it out of rubygems.org. You can set up your own private gem server or you can just include your gem in projects that need it.

like image 147
Alex Peachey Avatar answered Sep 13 '26 00:09

Alex Peachey