tags:

views:

145

answers:

1

Hi all, i'm trying to write a simple gui application to manage ruby version manager. i started with some stuff like testing how ruby's %x[ ] works.. i made this function

def do ( command ) %x[#{command}] end

if i try to use this function with one of the rvm commands like "rvm list" or rvm -v i get a command not found: error.

the same function used with another command like "ls -l" or "rm -rf /*" XD works correctly

can someone explane me why i get this error? thanks

A: 

The rvm you run in your terminal is a shell function and not a command. The real rvm command is in ~/.rvm/bin/rvm, and is most likely not in the path when you run %x[…].

Theo