[webroar] WebRoar installed and runs, but I get webroar: Command not found when running as sudo

10 views
Skip to first unread message

Bram P

unread,
Apr 23, 2010, 12:10:43 PM4/23/10
to WebROaR - Ruby Application Server
Hi,

I'm having a lot of different problems trying to get a Ruby on Rails
server running.
I'm now trying WebROaR, which I have finally installed (as in,
installed the gem via:
sudo gem install webroar)

When I run: webroar install
I get:
This command needs to be run as root. Please try again using 'sudo'.

When I run: sudo webroar install
I get:
sudo: webroar: command not found

When I run: webroar
I get:
WebROaR - Ruby Application Server

Usage:
webroar -h/--help
etc.

Seems to me webroar installed just fine, but somehow it's not in my
path?
How come it runs just fine without sudo?


--
Subscription settings: http://groups.google.com/group/webroar/subscribe?hl=en

Harm Lübben

unread,
Apr 23, 2010, 12:29:02 PM4/23/10
to web...@googlegroups.com
On Fri, Apr 23, 2010 at 6:10 PM, Bram P <bram.p...@gmail.com> wrote:
> [..]
> Seems to me webroar installed just fine, but somehow it's not in my
> path?
> How come it runs just fine without sudo?

this is an issue of your sudo setup - not a webroar issue.

gain yourself root by "sudo -i" and check the environment variables
removed and preserved by your sudo setup with "sudo -V". maybe the
PATH will be removed when sudoing.

to get on with webroar now, just find out where your webroar is
installed by "which webroar" and add the full path to your sudo
command, like "sudo /usr/bin/webroar install", etc.

regarding your sudo setup, you may consult the manual or a Unix/Linux group.

hth
--hl

Bram P

unread,
Apr 23, 2010, 12:37:28 PM4/23/10
to WebROaR - Ruby Application Server
Thanks,
I thought it would be something like that.
I'm now resolving a dependency issue regarding starling.
I'll Google for that first.

On Apr 23, 6:29 pm, Harm Lübben <harm.lueb...@googlemail.com> wrote:

Bram P

unread,
Apr 23, 2010, 12:46:17 PM4/23/10
to WebROaR - Ruby Application Server
Nope, no luck, I have starling installed:
$ which starling
/var/lib/gems/1.8/bin/starling

But if I run this:
sudo /var/lib/gems/1.8/bin/webroar install

I get:
Checking for the dependencies ...
....
Checking for starling........not found.
Unable to find starling at /usr/local/sbin,/usr/local/bin,/usr/sbin,/
usr/bin,/sbin,/bin,/usr/X11R6/bin,/usr/bin,/usr/sbin,/sbin,/usr/local/
sbin,/var/lib/gems/1.8/gems/webroar-0.3.1/bin.
The following dependencies required for installation could not be
found:
starling
Please refer the user guide for the list of prerequisites.

Harm Lübben

unread,
Apr 23, 2010, 1:17:30 PM4/23/10
to web...@googlegroups.com
On Fri, Apr 23, 2010 at 6:46 PM, Bram P <bram.p...@gmail.com> wrote:
> Nope, no luck, I have starling installed:
> $ which starling
> /var/lib/gems/1.8/bin/starling
>
> But if I run this:
> sudo /var/lib/gems/1.8/bin/webroar install
> [..]

looks still like the sudo problem.
i assume "/var/lib/gems/1.8/bin/" is removed from your path info by sudo.

to get on with the install _now_ you may copy or link starling to a
directory which is in the expected PATH. e.g. by "sudo ln -s
/var/lib/gems/1.8/bin/starling /usr/local/bin/starling".
this is a somehow ugly hack which does preserves against dealing with
your sudo setup ;-)

Bram P

unread,
Apr 23, 2010, 2:54:06 PM4/23/10
to WebROaR - Ruby Application Server
After some more trouble-shooting, I have WebRoar running.
Thanks for the help, your hints did help.

On Apr 23, 7:17 pm, Harm Lübben <harm.lueb...@googlemail.com> wrote:

Nikunj Limbaseeya

unread,
Apr 27, 2010, 1:52:37 AM4/27/10
to web...@googlegroups.com

To set $PATH environment variable with sudo commands, please refer the link http://stackoverflow.com/questions/257616/sudo-changes-path-why

excerpt:

This is an annoying function of sudo on ubuntu. Note this doesn't happen on fedora for example as sudo is not built with the --with-secure-path option there.

To work around this "problem" on ubuntu I do the following in my ~/.bashrc

alias sudo='sudo env PATH=$PATH'

nikunj
Reply all
Reply to author
Forward
0 new messages