Solved

Installing Rubygems on Centos4.3-32

Posted on 2008-10-12
12
983 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 Worsham
ID: 22705201
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
ID: 22710408
Thanks, but I already tries this, still gives me an older version of ruby
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22710879
Cut/paste an output of 'rpm -qa | grep ruby*' so we can get an idea of what you have already installed.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:GertoWS
ID: 22711026
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 Worsham
ID: 22711277
0
 

Author Comment

by:GertoWS
ID: 22711347
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 Worsham earned 500 total points
ID: 22711399
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
ID: 22711456
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
ID: 31505419
Thanks for the help!
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22711484
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 Worsham
ID: 22711512
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

839 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