Runnin 10.04 64bit Ubuntu. I have a deploy user, and have no problems with "bundle install" but had to update gems and tried this:
deploy@pluto:/opt/ruby/bin$ gem update --system
error:
Updating rubygems-update
Fetching: rubygems-update-1.8.10.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /opt/ruby/lib/ruby/gems/1.8 directory.
Tried with sudo:
deploy@pluto:/opt/ruby/bin$ sudo gem update --system
[sudo] password for deploy:
sudo: gem: command not found
Then logged in as root, and no problem!?
root@pluto:/opt/ruby/bin# gem update --system
Updating rubygems-update
Fetching: rubygems-update-1.8.10.gem (100%)
Successfully installed rubygems-update-1.8.10
Installing RubyGems 1.8.10
RubyGems 1.8.10 installed
This is my $PATH variable with and without sudo, any ideas what's wrong?
deploy@pluto:~$ echo 'echo $PATH' | sudo sh
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
deploy@pluto:~$ echo $PATH
/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games