Obfuscating Rails App on Mri Ruby/Jruby for a Enterprise Customer

Obfuscating Rails app on MRI Ruby / JRuby for a enterprise customer

i've used RubyEncoder. it is crossplatform and very flexible. if i remember correctly it works only with MRI.
check if it fits your needs.

Encoding Ruby on Rails code?

Maybe you could host the application yourself.

This way nobody will have ever access to your code and you're clients will use the application everywhere via Internet and also will pay you for the support.

In order to host rails application the easiest way you could try http://heroku.com/ or even set a small VPS with apache and mod_passenger.

Can you Distribute a Ruby on Rails Application without Source?

Your best option right now is to use JRuby. A little bit of background: My company (BitRock) works with many proprietary and commercial open source vendors. We help them package their server software, which is typically based on PHP, Java or Ruby together with a web server or application server (Apache, Tomcat), the language runtime and a database (typically Postgres, MySQL) into a self-contained, easy to use installer. We have a large number of PHP-based customers (including HelpSpot, which you mention) but also several Rails-based ones. In the case of the RoR customers the norm is to use JRuby together with Tomcat or Glassfish although in some cases we also bundle a native Ruby interpreter to run specific scripts that rely on libraries not yet ported to JRuby (usually not core to the application). JRuby has matured quickly and in many cases it actually runs their code faster than regular Ruby. You will need to also consider that although porting your code to JRuby is fairly straightforward, you will need to invest some time on that. You may want to check JRuby Stack which is a free installer of everything you need to get started. Good luck!

Jruby - rails app and sidekiq on same jvm instance

Due to high memory consumption your AWS microinstance will choke eventually. There is one way to have both Ruby App and Background process sidekiq running.

  • Either you can boot another EC2 micro with sidekiq. You app instance and sidekiq server will share the same Redis instance. So, your BG processing wont be disrupted.

  • Another way is to bootup a Heroku free dyno.

  • Or you can move to CRuby or MRI.

hope this helps

Is it possible to deploy a Rails application to a server in a way in which even the root can't view the code?

Same question as How to prevent my users to read my Ruby code?

Top answer there: jruby.

the ruby encoder looks like a viable solution, and is targeted at MRI & Rails. That would probably be my first try.

I would also guess Rubinius could be used for obfuscation, since it compiles to bytecode. I've seen it suggested for such use, but haven't seen anyone actually implement a deployment tool for such.

JRuby on Rails vs. Ruby on Rails, what's difference?

JRuby is the Ruby implementation that runs on a JVM whereas Matz's Ruby is a C implementation.

Key features to note are:

  1. JRuby runs on Java VM's and it's either compiled or interpreted down to Java byte code.
  2. JRuby can integrate with Java code. If you have Java class libraries (.jar's), you can reference and use them from within Ruby code with JRuby. In the other direction you can also call JRuby code from within Java. JRuby can also use the JVM and application server capabilities.
  3. JRuby is usually hosted within Java application servers such as Sun's GlassFish or even the Tomcat web server.
  4. Although you cannot use native Ruby gems with JRuby there are JRuby implementations for most of the popular Ruby libraries.

There are other differences which are listed at the JRuby wiki:

  • Differences between JRuby and Ruby (MRI)
  • JRuby On Rails


Related Topics



Leave a reply



Submit