Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17759

sudo make me understand...

$
0
0

So, I installed a vm today with the plan to also install nginx and spree in order to learn how nginx works and what it takes to setup a ruby webapp. Unfortunately, spree requires Ruby v 1.9.2 and CentOS comes with 1.8.7. So, I begin the process of compiling from source following the guide here: http://ask.xmodulo.com/upgrade-ruby-centos.html When I try to update Rubygems, I get an error-- can't find 'gem'. I run 'gem' as localuser, get the expected "help" info. I then run 'gem' as root, and I get the expected "help" info. But when I run 'sudo gem' as the localuser, it can't find gem. I then compare the $PATH of both localuser and root and find that both include /usr/local/bin which is where 'which gem' tells me the binary lives. CONFUSION! If the path to the gem binary is in the root user and the local users $PATH, why can't sudo find it?

tl;dr Where does sudo get its $PATH

submitted by /u/pupp3t33r
[link] [comments]

Viewing all articles
Browse latest Browse all 17759

Trending Articles