5
votes

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

5

5 Answers

11
votes

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

5
votes

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

3
votes

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.

1
votes

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

0
votes

Only solution I found was to install everything manually

manual install guide