Fixed it. It seems that if you add sudo
when installing gems, it installs the gem on a different directory from the one used when you don't use sudo
. I saw this when I did sudo gem list
and it displayed different results from a normal gem list
command.
To be able to add gems without sudo
I just did chown -R [current_user] [ruby_directory]