check out my new blog at

Saturday, October 25, 2008

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

As you can see rake path is not included:
$ which 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

Labels: , ,


Post a Comment

<< Home