Cannot install Ruby on CentOS
Asked Answered
H

5

5

I just cannot install Ruby on my CentOS (which is also hosting a cPanel).

sudo yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri


audit_log_user_command(): Connection refused

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

  • base: mirror.sov.uk.goscomb.net
  • updates: mirror.sov.uk.goscomb.net
  • addons: mirror.sov.uk.goscomb.net
  • extras: mirror.sov.uk.goscomb.net

base | 1.1 kB 00:00
updates | 951 B 00:00
addons | 951 B 00:00
extras | 1.1 kB 00:00

Excluding Packages in global exclude list

Finished

Setting up Install Process

Parsing package install arguments

No package ruby available.

No package ruby-devel available.

No package ruby-irb available.

No package ruby-rdoc available.

No package ruby-ri available.

Nothing to do


What can be the problem?

Thanks

Holden answered 28/8, 2009 at 11:41 Comment(0)
I
3

For Ruby 1.8.6 I had to add another repository.

Create /etc/yum.repos.d/ruby.repo and add the following:

[ruby]
name=ruby
baseurl=http://repo.premiumhelp.eu/ruby/
gpgcheck=0
enabled=0

Then

yum --enablerepo=ruby install ruby

From www.centos.org forums.

Don't bother installing rubygems this way, it's obsolete.

Irradiant answered 28/8, 2009 at 12:38 Comment(2)
yum --enablerepo=ruby install rubyTelephony
Broken link: repo.premiumhelp.eu/ruby/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"Vincent
P
11

The recommended way to install ruby on a cPanel/WHM server is to run the script /scripts/installruby as root. Or you could remove ruby from the exclude list at your own risk.

More info at:

http://docs.cpanel.net/twiki/bin/view/AllDocumentation/RubyonRails/InstallingRuby

Pythian answered 6/3, 2011 at 13:16 Comment(1)
Please paste the commands. If the link is deprecated the answer is useless.Escalade
L
5

CPanel/WHM puts the ruby packages the exclude list. If you verify your /etc/yum.conf file, you will probably see a line similar to:

exclude= (...) ruby* (...)

The recommended way to install ruby on a cPanel/WHM server is to run the script /scripts/installruby as root. Or you could remove ruby from the exclude list at your own risk.

More info at:

http://docs.cpanel.net/twiki/bin/view/AllDocumentation/RubyonRails/InstallingRuby

Lupelupee answered 2/9, 2010 at 16:22 Comment(0)
I
3

For Ruby 1.8.6 I had to add another repository.

Create /etc/yum.repos.d/ruby.repo and add the following:

[ruby]
name=ruby
baseurl=http://repo.premiumhelp.eu/ruby/
gpgcheck=0
enabled=0

Then

yum --enablerepo=ruby install ruby

From www.centos.org forums.

Don't bother installing rubygems this way, it's obsolete.

Irradiant answered 28/8, 2009 at 12:38 Comment(2)
yum --enablerepo=ruby install rubyTelephony
Broken link: repo.premiumhelp.eu/ruby/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"Vincent
A
1

Better Way Go to Software section in WHM and then go to 'modules' then select Ruby Gems..... It would ask you to install and continue!(select that)

It would be a very long process (in terms of text) A portion of text i got in the installation process:-

RubyGems installed the following executables:
    /usr/bin/gem

Removing source directory /home/cprubygemsbuild
gem system update ...
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.8.24
Updating RubyGems to 1.8.24
Installing RubyGems 1.8.24
RubyGems 1.8.24 installed

== 1.8.24 / 2012-04-27

* 1 bug fix:

  * Install the .pem files properly. Fixes #320
  * Remove OpenSSL dependency from the http code path


------------------------------------------------------------------------------

RubyGems installed the following executables:
    /usr/bin/gem

gem system update complete.

Installing rails...

I found this method just now

Affinal answered 18/7, 2012 at 11:49 Comment(1)
Successfully installed rake-0.9.2.2 Successfully installed activesupport-2.3.14 Successfully installed activerecord-2.3.14 Successfully installed rack-1.1.3 Successfully installed actionpack-2.3.14 Successfully installed actionmailer-2.3.14 Successfully installed activeresource-2.3.14 Successfully installed rails-2.3.14Affinal
B
0

Only solution I found was to install everything manually

manual install guide

Buckboard answered 15/6, 2010 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.