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
but 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 explain to me why I get this error?
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[…].
加载中,请稍侯......
精彩评论