Ruby : Compiling your source code to byte code

Hey, from ruby 2.3.0 its so easy to compile your source code to bytecodes the Ruby-VM understands.

byte_code = RubyVM::InstructionSequence.compile_file '/home/john/somefile.rb'

File.binwrite '/home/john/bytecode', byte_code.to_binary

and in Command Line Continue reading

Advertisements

Ruby On Rails : VmWare : Open your localhost running inside a virtual machine from your host

If you are running Ubuntu 14.04 in your virtual machine and want to run your web application from your host OS viz. Windows or OSx then this post is for you.

Continue reading