I am trying to use sudo with chruby and foreman, but without success.
I tried
$ sudo chruby-exec ruby-2.1.2 -- foreman
$ foreman: command not found
But the same command with rake
command works fine.
$ sudo chruby-exec ruby-2.1.2 -- rake --version
$ rake, version 10.1.0
OS: Ubuntu 14.04
I haven't any ruby installed at root or at system, only at user.