jruby

1

jruby

jruby interpreter

                jruby
                switches
                --
                programfile
                arguments

## Desription

JRuby is a pure Java implementation of the Ruby programming language.

## Switches

-0 `octal`

- Specify the record separator (`\0` if no argument is given)

-a

- autosplit mode with `-n` or `-p` (splits `$_` into `$F`)

-b

- benchmark mode, times the script execution

-c

- check syntax only

-C `directory`

- `cd` to `directory` before executing your script

-d

- set debugging flags (sets `$DEBUG` to true)

-e `command`

- one line of script. Several `-e`'s are allowed. Omit `programfile` in this case. To be sure that your shell does not mangle the `command`, put it within double quotes.

-f`pattern`

- `split()` pattern for autosplit (`-a`)

-h

- Show the command help

-i`extension`

- edit `ARGV` files in place (make backup if extension supplied)

-I`directory`

- specify `$LOAD_PATH` directory (may be used more than once)

-J`java option`

- pass an option to the JVM (e.g. `-J-Xmx512m`). Use `--properties` to list JRuby properties. Run `java -help` for a list of other Java options.

-K`kcode`

- specifies code-set (i.e. `-Ku` for Unicode, `-Ke` for EUC and `-Ks` for SJIS)

-l

- enable line ending processing

-n

- assume while gets(); ... end loop around your script

-p

- assume loop like `-n` but print line also like `sed`

-r`library`

- require the library, before executing your script

-s

- enable some switch parsing for switches after script name

-S

- look for the script in `bin` or using `PATH` environment variable

-T`level`

- turn on tainting checks

-v

- print version number, then turn on verbose mode

-w

- turn on warnings for your script

-W`level`

- set warning level: 0=silence, 1=medium, 2=verbose(default)

-X`option`

- enable extended option (omit `option` to list them)

-y

- enable parsing debug output

--copyright

- print the copyright notice and exit

--debug

- sets the execution mode most suitable for debugger functionality

--help

- shows the online help, listing all the command line options

--jdb

- runs the `jruby` process under JDB

--properties

- List all configuration Java properties (pass `-J-Dproperty=value` to set them)

--sample

- run with profiling using the JVM's sampling profiler

--client

- use the non-optimizing "client" JVM (improves startup time; default)

--server

- use the optimizing "server" JVM (improves performance, but takes longer to start)

--manage

- enable JMX management and monitoring of the VM and JRuby via local process connections from tools like `jconsole`. Process name is `org.jruby.Main`. To enable remote connections via JMX remoting, you need to pass additional parameters via `-J`.

--headless

- do not launch a GUI window, no matter what. Corresponds to the JVM option `-Djava.awt.headless`

--1.8

- specify Ruby 1.8.x compatibility (default)

--1.9

- specify Ruby 1.9.x compatibility (not yet fully done)

--bytecode

- show the JVM bytecode produced by compiling specified code

--version

- print the version

## See also

http://jruby.org

## Author

The JRuby team

This manual page was written by Heiko Rupp