Thursday, February 21, 2013

Execute one line command on IRB or Rails's console through Unix shell

Basic Unix approach - echo and pipe:
$ echo "<command>" | irb
For example,
$ echo "1 + 1" | irb
1 + 1
You can change irb to rails console to execute that command in the Rails environment.

No comments:

Useful commands for observe running JVM process

$ jcmd List running processes $ jinfo  Get details of a process $ jps -lvm List running processes with params