I’ve been following the Ruby On Rails Tutorial and tried to get rid of the need for bundle exec.. by following this tutorial video.
However, now when I try to run a command like rails s or rails server. I’m getting this error.
/Users/Keva161/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:211: warning: Insecure world writable dir /Users/Keva161/Documents/Web Design in PATH, mode 040777
/Users/Keva161/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:211: warning: Insecure world writable dir /Users/Keva161/Documents/Web Design in PATH, mode 040777
Does anyone know what this error is and how to fix it?
/Users/Keva161/Documents/Web Designis indeed world-writeable, and is in your PATH; that means anyone with access to your system can place untrusted programs/scripts there and you run the risk of accidentally running them. From the first part of the screencast (I stopped watching when he started talking about Guard), I don’t see anything that would have caused this; the closest thing was thechmodcommand, but I don’t see how even a reasonable mistyping could have modified yourWeb Designdirectory.Regardless of that, the fix is to change the permissions of that directory so it’s not world-writeable, and optionally take it out of your
PATH, depending on whether you actually need it there. A simplechmod o-w "/Users/Keva161/Documents/Web Design"should suffice for the former, but you might want to add-Rright afterchmodto apply it to all directories under that one. For taking it out of yourPATH, I assume you know how to do it in your zsh config file (I don’t use zsh so I won’t give you a bash answer assuming it will still apply).