nachocab
nachocab

Reputation: 14364

how is ruby global path variable set up?

If I do ruby -v I get:

ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]

But if I do ruby -e 'puts $:' I get:

/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:31:in `require': cannot load such file -- rbconfig (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:31:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'

What do I need to do to edit the $: variable so it stop looking for ruby 1.9.1?

Upvotes: 0

Views: 1442

Answers (1)

Anil
Anil

Reputation: 3919

$: is the shorthand name for $LOAD_PATH.

Maybe gem is using a different Ruby than ruby; try:

which ruby
gem env | grep 'RUBY EXECUTABLE'

If you get different results, then we know where the problem lies.

Upvotes: 1

Related Questions