1

After install fresh ruby (v 2.2.2) and rails (v 4.2.1). i try create new app by commnad rails new app in my terminal. But print errors like this:

Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/byebug-5.0.0
An error occurred while installing byebug (5.0.0), and Bundler cannot continue.
Make sure that `gem install byebug -v '5.0.0'` succeeds before bundling.

After that i run bundle install . but again show same error! how to fixed this issue? Why it say Permission denied ?

Thanks.

theoretisch
  • 1,718
  • 5
  • 24
  • 34
Dark star
  • 5,192
  • 9
  • 35
  • 54

1 Answers1

1

Try installing gem byebug with sudo privilege

sudo gem install byebug -v '5.0.0'

Enter the password to elevate the privilege.
Perhaps this would solve this issue temporarily, consider looking at this question.

Community
  • 1
  • 1
BinaryMee
  • 2,102
  • 5
  • 27
  • 46
  • This worked for me by just doing `sudo bundle install` now it did give me an error: `Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.` but i am the only user so i don't care. – Eric Oct 05 '16 at 00:18