warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
I had the same error here MacOSX 10.6.8 - it seems ruby checks to see if any directory (including the parents) in the path are world writable. In my case there wasn't a /usr/local/bin present as nothing had created it.
so I had to do
sudo chmod 775 /usr/local
to get rid of the warning.
A question here is does any non root:wheel process in MacOS need to create anything in /usr/local ?
You will need to have root access to do this. If you aren't already the administrative user, login as the administrator. Then use 'sudo' to change the permissions:
sudo chmod go-w /usr/local/bin
Obviously, that will mean you can no longer install material in /usr/local/bin except via 'sudo', but you probably shouldn't be doing that anyway.
Try: sudo chmod go-w /usr/local/bin
The /usr/local/bin directory is owned by the root
(i.e. administrator) account, so even if you can write to it, you can't change the permissions on it. The sudo
command means "run the following command as root", and works a lot like clicking that lock icon in the System Preferences dialogs.
I have had the same issue in OSX. It can be fixed by running Disk Utilities to Repair Permissions. I agree with Peter Nixey: in my case it is caused when my 3G dongle installs or reinstalls its driver. Repairing Permissions afterward fixes the issue.