Solved

Installing Rubygems on Centos4.3-32

Posted on 2008-10-12
12
979 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
 

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

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Block sender e-mail address in Postfix 4 65
Trying to make SNMP connection work 7 65
Linux Scripting 3 97
Setting up two Raspberry Pi gateways/routers 3 39
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
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.

911 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

22 Experts available now in Live!

Get 1:1 Help Now