apologies if this is a bad stackoverflow question....I'm a ruby noob
开发者_高级运维On several OSX systems I have, I seem to have two different installations of rubygems because I can do
sudo gem install foobar
and then in my code
require 'rubygems'
require 'foobar'
and get
no such file to load — foobar
How do I solve this so I just have one installation of rubygems that all my code knows the location of?
What you really need to do is investigate RVM, the Ruby Version Manager. You can set up all sorts of independent Ruby installations with different gems, different versions of rails, and so forth, and control the paths.
For your specific issue, you need to make sure your Ruby search path goes where you think it does.
精彩评论