Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The command starling is located at /home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling.

Only using rvmsudo starling will work properly. This is the result of me trying to invoke it in various other ways:

$ starling
Permission denied
$ sudo starling
sudo: starling: command not found
$ sudo /home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling
/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:in `to_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 `<main>'

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).

share|improve this question
Could be duplicate over at Stack Overflow: How do you run or install starling under RVM? – Bobby Mar 23 '12 at 8:55
The question's not exactly a duplicate, but the solution is. The problem is that by default "sudo" will not call the program with the exact same environment you had as a user; rvmsudo preserves the relevant pieces, but the service command doesn't pass it on to upstart (it just instructs upstart to do something, so upstart's environment is relevant, not yours). Your solution is to provide the dependencies in the system or root default environment. – Gabe Apr 29 '13 at 10:41

Contrary to popular belief, running sudo does not just run with elevated privileges, it runs at the user root. Your problem is that starling is installed locally to your profile, and root doesn't know that it exists. To fix this issue you need to add starling to your PATH.

In your case try this:

  1. sudo su -
  2. PATH=$PATH:/home/keating/.rvm/gems/ruby-1.9.2-p290/bin/
  3. export PATH
  4. starling

If that works, add that folder to your root path, then sudo starling should work. Here is a good article about it.

share|improve this answer

Become root with the command below:

sudo su -

share|improve this answer

Try this.

sudo passwd root

Now you can give in a password for root user. After which you can run:


Now you have elevated priviliges. Try running your app now...

share|improve this answer
For the sake of whatever you hold holy, no! There's a reason why there's no password set in Ubuntu by default, making the root-account available is seldom (if never) a solution. – Bobby Mar 23 '12 at 8:55
You are right. SELDOM. Now it seems to be the case. I change it back whenever I am ready. – Aaaaaaaaaha ERLEBNIS Mar 23 '12 at 8:57
Wouldn't sudo su achieve the same? – Dennis Apr 1 '12 at 4:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .