Add explicit JRuby and Rubinius compatibility

Do not write to stdout. Use Rails' logger if you want to log.