开发者

Two different Rubygems installations!

开发者 https://www.devze.com 2023-03-13 12:25 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消