1

When attempting to install rails, I get the following:

$ gem install ruby
Fetching: ruby-0.1.0.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/1.8 directory.

I installed ruby 1.9.3 with rbenv and set it to the global version:

rbenv global 1.9.3-p448

So I'm not sure why it's trying to access the system version...?

3
  • I'd recommend using rvm.io for managing a separate Ruby version. Commented Nov 22, 2013 at 0:29
  • if you run which ruby what do you get? Commented Nov 22, 2013 at 0:31
  • I get 1.8, the pre-installed system version Commented Nov 22, 2013 at 0:33

1 Answer 1

2

Fixed it by adding the following to .bash_profile:

export PATH="$HOME/.rbenv/bin:$PATH"

Also, this line is needed too (though it was already there):

eval "$(rbenv init -)"

For info on modifying bash_profile, see:

http://redfinsolutions.com/blog/creating-bashprofile-your-mac

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.