I am new to programming and trying to install Rails on Mac Yosemite v10.10, but I get the following error when running $ gem install rails
. How do I avoid this error and install rails?
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/usename/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/rails-4.1.7/README.md
I'm using ruby version 2.0.0p481.
You could make this:
sudo chown -R "$USER": ~/.rbenv
This function for me.