Can't run command with sudo, even with the full path, I got an error
- by Keating Wang
the command starling is
/home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling
when run starling, get the error Permission denied
when run rvmsudo starling, works well
when run sudo starling, get the error sudo: starling: command not found
when run sudo /home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling, get the error:
/home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find starling (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)
from /home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:into_spec'
from /home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1229:in gem'
from /home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling:18:in'
I really want to run the command with sudo, because the error above is the same as running rvmsudo service starling start(I had set starling as a service of the os)