0

I installed rbenv yesterday to install Gosu. I followed "How to Install Rbenv on OS X" and everything worked fine.

Today, I started a new Gosu project, and it gave me this error:

 my_game.rb:1:in `require': no such file to load -- gosu (LoadError)
from my_game.rb:1

So I tried:

gem install Gosu

Which gives:

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.

But rbenv global gives:

1.9.3-p0

What is going on? Shouldn't the running Ruby be 1.9.3-p0? I tried rbenv rehash several times and I also tried rbenv init.

I also have:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

in my ~/.zshrc file.

What am I doing wrong?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Roald
  • 231
  • 1
  • 12

0 Answers0