Warning: insecure access to the world when I run the ruby ​​or gem command

Not sure why I get this, but I just installed RVM, the new Ruby 1.9 and reinstalled a bunch of gems, and I get it

/Users/johnsmith/.rvm/rubies/ruby-1.9.1-p378/bin/gem:4: warning: the unsafe write world dir / opt / local / bin in PATH, mode 040777

Everything still works differently, but I was wondering if there was a way to get rid of it.

+41
ruby-on-rails rubygems osx-snow-leopard macos
May 09 '10 at 2:37 a.m.
source share
5 answers

Just chmod go-w /opt/local/bin on the command line (depending on permissions you may need sudo ).

+87
May 09 '10 at 3:21 a.m.
source share

To clarify which path returns after he talks about an unsafe world for recording, this is what you use.

So, instead of: chmod go-w / opt / local / bin, you would replace / opt / local / bin no matter what your path is.

+10
Feb 25 '13 at 23:16
source share

Find your way to create gems so we can edit the gem. Do the following in your shell:

 $ ruby -r rubygems -e "p Gem.path" 

Go to your gem and cd path to the version of the package you are currently using. Now go to lib -> bundler and open runtime.rb in your favorite text editor. Add "$ VERBOSE = nil" to line 2.

 require "digest/sha1" $VERBOSE = nil module Bundler class Runtime < Environment include SharedHelpers def setup(*groups) # Has to happen first clean_load_path 

...

+3
Oct. 15 '11 at 10:16
source share

If your environment does not allow correcting this error properly (i.e. ruby ​​lives on a network resource or some such), see this answer for a way to suppress the error .

+1
Feb 19 '14 at
source share

In some cases (like mine), the stack goes deeper than opt/local/bin . In this case, use

 sudo chmod go-w opt/local/*/bin usr/local/*/bin opt/local/bin usr/local/bin 

In any case, the error tells where the unsafe world is.

0
Oct 14 '11 at 15:43
source share



All Articles