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

  • SEARCH
  • Home
  • 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 6719789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:08:03+00:00 2026-05-26T09:08:03+00:00

Installed Ubuntu 11.10, removed Ruby1.8.7 completely, and then installed Ruby1.9.2-p290 from source, followed by

  • 0

Installed Ubuntu 11.10, removed Ruby1.8.7 completely, and then installed Ruby1.9.2-p290 from source, followed by rubygems1.8.10. Here’s the script I ran for installation …

#!/bin/bash
#===============================================================================
#
#          FILE:  install_ruby_1.9.sh
# 
#         USAGE:  ./install_ruby_1.9.sh 
# 
#        AUTHOR: Ryan Schulze (rs), ryan@dopefish.de
#       CREATED: 07/07/2011 11:59:37 AM CDT
#===============================================================================

Version="1.9.2-p290"
GZFile="ruby-${Version}.tar.gz"
Download="http://ftp.ruby-lang.org/pub/ruby/1.9/${GZFile}"

if [[ "$(id -u)" != "0" ]]
then
echo "You need root permission to execute this script"
exit
fi

apt-get -q update
apt-get -qy upgrade
apt-get install -qy build-essential wget zlib1g-dev libssl-dev libffi-dev autoconf

cd /usr/local/src/
test -e ${GZFile} || wget ${Download}
tar -xzf ${GZFile}
cd ruby-${Version}

autoconf
./configure --with-ruby-version=${Version} --prefix=/usr --program-suffix=${Version} 
make
make install

mkdir -p /usr/lib/ruby/gems/${Version}/bin

update-alternatives \
    --install /usr/bin/ruby ruby /usr/bin/ruby${Version} $(echo ${Version//./}|cut -d- -f1) \
    --slave   /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby${Version}.1 \
    --slave   /usr/lib/ruby/gems/bin        gem-bin   /usr/lib/ruby/gems/${Version}/bin \
    --slave   /usr/bin/irb  irb  /usr/bin/irb${Version} \
    --slave   /usr/bin/gem  gem  /usr/bin/gem${Version} \

    update-alternatives --config ruby
    update-alternatives --display gem >/dev/null 2>&1 && update-alternatives --remove-all gem

…

The script ran perfectly, and ruby works fine …. except for rubygems (which was also installed from source):

$: irb
irb(main):001:0> require 'rubygems'
=> false

But, it points to the correct version:

$: which gem
/usr/bin/gem
$: file /usr/bin/gem
/usr/bin/gem: symbolic link to `/etc/alternatives/gem'
$: file /etc/alternatives/gem
/etc/alternatives/gem: symbolic link to `/usr/bin/gem1.9.2-p290'

Also, here’s the gem environment:

$: gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.10
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.2-p290/bin/
  - RUBY EXECUTABLE: /usr/bin/ruby1.9.2-p290
  - EXECUTABLE DIRECTORY: /usr/lib/ruby/gems/1.9.2-p290/bin/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.9.2-p290/bin/
     - /home/rbanerjee/.gem/ruby/1.9.2-p290
     - /usr/lib/ruby/gems/1.9.2-p290
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I am at a loss as to what happened. Similar upgrades worked when, in another machine, I had gone from 1.8.7 to 1.9.1. I have tried providing all the details, making this a long question. Any help at all will be greatly appreciated.

  • 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-26T09:08:04+00:00Added an answer on May 26, 2026 at 9:08 am

    In Ruby 1.9, require 'rubygems' always returns false. The Rubygems package is included in 1.9 so you don’t need to require it separately.

    Are you seeing a problem beyond the false return value? (i.e. are your gems not actually working?)

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

Sidebar

Related Questions

by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk,
I've installed Ubuntu Server (8.04) into Parallels and found that the system time/clock ran
I've installed Subversion on Ubuntu following the guide Installation of Subversion on Ubuntu, with
I have ruby on rails installed on my ubuntu 8.10 desktop. Script/generate came up
I installed Eclipse on my Ubuntu machine and then the Ruby Development Tools (RDT),
I can't seem to install zlib properly, I installed Python from source on Ubuntu10.4
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World
I recently installed Ubuntu Jaunty and I'm encountering a problem when I try to
I just installed ubuntu on my PC, and now I wish to browse into
I need to determine which version of GTK+ is installed on Ubuntu Man does

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.