?
Solved

Installing Rubygems on Centos4.3-32

Posted on 2008-10-12
12
Medium Priority
?
995 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 1500 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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