using rake with sudo
I was installing datamapper gems like:
gmarik@gm:master\dm-more.git$ sudo rake install
sudo: rake: command not found
sudo restricts environment settins:
$ sudo env|\grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbinAs you can see
rake path is not included:
$ which rake
/usr/local/lib/ruby/gems/bin/rake
You can edit
sudo PATH to include /usr/local/lib/ruby/gems/bin. === UPDATED AT 2008.12.04 =====
or run rake with
PATH set like:
sudo env PATH=$PATH rake===============================
Bu i just symlinked
rake:
$sudo ln -s `which rake` /usr/local/bin/
Now it works:
$ sudo rake --version
rake, version 0.8.3




3 Comments:
uh, thank you very much! it really worked. :D :D
Glad it's helpful for u! :)
Thanks. The symlink to rake is what I really need
Post a Comment
<< Home