Solved

Installing Rubygems on Centos4.3-32

Posted on 2008-10-12
12
975 Views
Last Modified: 2013-12-06
I'm trying to install Ruby and Rubygems on a dedicated server.
I installed ruby through "yum install ruby" after doing "yum update".

Now when I try to install Rubygems 1.3, I get the following error when doing ruby setup.rb:
./lib/rubygems.rb:713:in `set_paths': uninitialized constant Gem::Etc (NameError)
        from ./lib/rubygems.rb:711:in `each'
        from ./lib/rubygems.rb:711:in `set_paths'
        from ./lib/rubygems.rb:518:in `path'
        from ./lib/rubygems/source_index.rb:66:in `installed_spec_directories'
        from ./lib/rubygems/source_index.rb:56:in `from_installed_gems'
        from ./lib/rubygems.rb:726:in `source_index'
        from ./lib/rubygems/gem_path_searcher.rb:86:in `init_gemspecs'
        from ./lib/rubygems/gem_path_searcher.rb:21:in `initialize'
        from ./lib/rubygems.rb:676:in `new'
        from ./lib/rubygems.rb:676:in `searcher'
        from ./lib/rubygems.rb:675:in `synchronize'
        from ./lib/rubygems.rb:675:in `searcher'
        from ./lib/rubygems/custom_require.rb:30:in `require'
        from /usr/lib/ruby/1.8/tmpdir.rb:12
        from ./lib/rubygems/custom_require.rb:27:in `gem_original_require'
        from ./lib/rubygems/custom_require.rb:27:in `require'
        from setup.rb:95


Additionally, I noticed that when doing ruby -v,  the ruby version is 1.8.1 (2003-12-25) [i386-linux-gnu]

If it's impossible to fix this, instructions to manually compile ruby are welcome as well.
0
Comment
Question by:GertoWS
  • 6
  • 5
12 Comments
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
This article is geared to CentOS 5, but should work for you as well:
http://blog.simb.net/2007/08/21/installing-ruby-and-rubygems-on-centos-5/

0
 

Author Comment

by:GertoWS
Comment Utility
Thanks, but I already tries this, still gives me an older version of ruby
0
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
Cut/paste an output of 'rpm -qa | grep ruby*' so we can get an idea of what you have already installed.
0
 

Author Comment

by:GertoWS
Comment Utility
ruby-devel-1.8.1-7.el4_6.1
ruby-1.8.1-7.el4_6.1
grub-0.95-3.8
ruby-libs-1.8.1-7.el4_6.1
ruby-docs-1.8.1-7.el4_6.1
0
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:GertoWS
Comment Utility
Result:
Setting up Install Process
Setting up repositories
http://mirrors.service.softlayer.com/centos/4/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (113, 'No route to host')>
Trying other mirror.
update                    100% |=========================|  951 B    00:00
http://mirrors.service.softlayer.com/centos/4/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (113, 'No route to host')>
Trying other mirror.
base                      100% |=========================| 1.1 kB    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
No Match for argument: rubygems
Nothing to do
0
 
LVL 29

Accepted Solution

by:
Michael W earned 500 total points
Comment Utility
You might have to subscribe to testing repository from CentOS...

http://www.cherpec.com/2008/07/install-rubygems-on-centos-4/
0
 

Author Comment

by:GertoWS
Comment Utility
Funny, I just found information that was about the same on this link:
After doing this:
http://opensoul.org/2006/8/2/rpms-for-deploying-rails-on-centos

and then twice
yum install -y ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc

after that I had ruby 1.8.5 (not  completely up to date but better) and managed to install ruby.

Now I still need to find a way to get the latest version of ruby, but that is out of the scope of this question I guess.

Your replies helped me in the right direction, thanks!
0
 

Author Closing Comment

by:GertoWS
Comment Utility
Thanks for the help!
0
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
I tried using the instructions from the same link under CentOS 5 and it worked like a charm.

Glad I could help point you in the right direction.

-- Michael
0
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
After using the steps above from that 'blog' post...

To upgrade to RubyGems 1.3, try doing this:

gem install rubygems-update
update_rubygems

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now