Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 873235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:54:05+00:00 2026-05-15T10:54:05+00:00

NOTE: user377519 (answer below) pointed me in the right direction. I’ve posted the ‘fix’

  • 0

NOTE: user377519 (answer below) pointed me in the right direction. I’ve posted the ‘fix’ at the bottom of the questions, in case you found this and need more than a ‘pointer’

I can’t figure out why the second call to “gem env” doesn’t have the same environment as the first?
Any pointers? This is driving me crazy!!!!

$ which gem

/usr/local/bin/gem

$ /usr/local/bin/gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.8 (2010-06-26 patchlevel 1) [i386-darwin9.8.0]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-darwin-9
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.8
     - /Users/pauliprice/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com", "http://gems.github.com"]
  - REMOTE SOURCES:
  - http://gems.rubyforge.org/
  - http://gems.github.com
  - http://gems.github.com

$ gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/pauliprice/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com", "http://gems.github.com"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com
     - http://gems.github.com

SOLUTION:

Given that you don’t (as I do not) want to switch between different versions, merely install a new version, on you OSX 10.5 box, this is how to get RubyGems installed correctly.

Assuming you built and installed your new Ruby like this:

./configure --prefix=/usr/local --enable-pthread
sudo make
sudo make install

edit your ~/.bash_profile and add this line

export PATH=/usr/local/bin:$PATH

Save and refresh your terminal. Then you should install RubyGems like this:

Download and setup latest rubygems

wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar -xzv http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo su
# export PREFIX=/usr/local
# export GEM_HOME=$PREFIX/lib/ruby/gems/1.8
# export RUBYLIB=$PREFIX/lib/ruby:$PREFIX/lib/site_ruby/1.8
# ruby setup.rb all —prefix=$PREFIX
exit

edit ~/.bash_profile and add the following lines

export PREFIX=/usr/local
export GEM_HOME=$PREFIX/lib/ruby/gems/1.8
export RUBYLIB=$PREFIX/lib/ruby:$PREFIX/lib/site_ruby/1.8

And you’re all good.
Refresh Terminal,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:54:06+00:00Added an answer on May 15, 2026 at 10:54 am

    Ruby and its tools are “smart.” They are aware of execution context and will look for configurations based on where they are started. The first execution is out of a system directory, while the later is out of your home directory.

    Given that you have two different versions and you’re on Mac, it means you had to have either installed Ruby manually or through RVM. Given that the newer version is out system directory, I guess that you attempted to install a newer version of Ruby manually and am now confused why it’s not working for you. You installed it into system space, but did not update Ruby’s configuration in your home directory. Unfortunately, I have no answer how to get you out of this position. Hopefully, you have something that will let you undo your install.

    The far safer way of installing different copies of Ruby is to use Ruby Version Manager (RVM). It does all the magic necessary to install multiple copies of Ruby without changing the system. From the command line you can invoke using a different interpreter for that session. Thus, system stays untouched but you can run JRuby, v1.9.2, etc.

    Hope this gets you in a direction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.