Byebug error while installing

Hello, I am having problems installing byebug:

Errno::EACCES: Permission denied @ dir_s_mkdir - /Users/CTO/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.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.

I ran the recommended install command and got this:
Building native extensions. This could take a while... ERROR: While executing gem ... (Errno::EACCES) Permission denied @ dir_s_mkdir - /Users/CTO/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/byebug-5.0.0

Help will be much appreciated

looks like a permissions issue.

try sudo gem install byebug ?

also note per rubygems.org/gems/byebug the current release is v9.0.6

take that with a grain of salt though, im a incoming student, not a TA so maybe there’s a reason to be using v5.0.0. haven’t gotten through all of the prep work yet!

I got it to work. Thank you!!

youre welcome! :smiley: