1

I have been trying to install rails usuing terminal.When i write on Terminal gem install bundler I get the results like this:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /Users/RiduanlIslam in PATH, mode 040777
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.

Can anybody please tell me how can i fix the problem?How can i enable file permission? Thanks!

MdRiduan
  • 307
  • 3
  • 11
  • 3
    usually with system installed rubies you need to use sudo. Generally it's considered better practice now to use something like rvm, chruby or rbenv to manage your rubies and then you would just do "gem install ..." – Andy Henson Mar 15 '14 at 13:59

1 Answers1

2

As Andy Henson said on the comments, I'd recommend using rvm to install ruby and rails. However, to solve your issue, all you'd need to do is

sudo gem install bundler

and enter your password, assuming you're a system admin.

Joe Kennedy
  • 9,365
  • 7
  • 41
  • 55
  • When i run..Mds-MacBook-Pro:~ RiduanlIslam$ sudo gem install bundler.I found the warning below: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /Users/RiduanlIslam in PATH, mode 040777 Please tell me what can i do now? I'm also not familiar with rvm. – MdRiduan Mar 15 '14 at 16:31
  • http://stackoverflow.com/questions/2796421/warning-insecure-world-writable-dir-when-i-run-a-ruby-or-gem-command This is as far as I can take you with your installation. Check out rvm here: https://rvm.io/ It's a bit difficult to get installed, but it's absolutely worth it. – Joe Kennedy Mar 15 '14 at 17:29