Solved

Installing Rubygems on Centos4.3-32

Posted on 2008-10-12
12
982 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
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 W
ID: 22710879
Cut/paste an output of 'rpm -qa | grep ruby*' so we can get an idea of what you have already installed.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php ssh2_scp_send 1 61
Why isn't object file created? 6 59
su - oracle could not open session 6 78
blank screen when trying to setup Unity on Ubuntu 14.04 8 17
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

810 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