Error when starting rails server: warning: Insecure world writable dir /usr in PATH, mode 040777 [duplicate] Error when starting rails server: warning: Insecure world writable dir /usr in PATH, mode 040777 [duplicate] ruby ruby

Error when starting rails server: warning: Insecure world writable dir /usr in PATH, mode 040777 [duplicate]


Try the option "Repair Disk Permissions" from the disk utility

[EDIT]

For OS X El Capitan:

sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /

enter image description here


Try your chmod with a -R (for recursive):

chmod -R o-w /usr/local/


About the warnings:

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

They are telling you that the directory /usr (and not /usr/local) is world writable. To fix: chmod -R go-w /usr.

The error says:

... `load': /Users/yassine/treebook/app/models/user.rb:12: syntax error, unexpected keyword_end (SyntaxError)

There's an extra end keyword on line 12 in your user.rb file.