warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

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.

Can’t install gems on OS X “El Capitan”

Disclaimer: @theTinMan and other Ruby developers often point out not to use sudo when installing gems and point to things like RVM. That’s absolutely true when doing Ruby development. Go ahead and use that. However, many of us just want some binary that happens to be distributed as a gem (e.g. fakes3, cocoapods, xcpretty …). … Read more

Rails: Installing PG gem on OS X – failure to build native extension

Same error for me and I didn’t experience it until I downloaded OS X 10.9 (Mavericks). Sigh, another OS upgrade headache. Here’s how I fixed it (with homebrew): Install another build of Xcode Tools (typing brew update in the terminal will prompt you to update the Xcode build tools) brew update brew install postgresql After … Read more

‘sudo gem install’ or ‘gem install’ and gem locations

You can also install gems in your local environment (without sudo) with gem install –user-install <gemname> I recommend that so you don’t mess with your system-level configuration even if it’s a single-user computer. You can check where the gems go by looking at gempaths with gem environment. In my case it’s “~/.gem/ruby/1.8”. If you need … Read more

How to install gem from GitHub source?

well, that depends on the project in question. Some projects have a *.gemspec file in their root directory. In that case, it would be gem build GEMNAME.gemspec gem install gemname-version.gem Other projects have a rake task, called “gem” or “build” or something like that, in this case you have to invoke “rake “, but that … Read more