Quick resolution of gem install redis error

When installing redis cluster

Error reason: if redis is installed, the minimum Ruby version is 2.2.2, while the current version is 2.0.0, so it cannot be installed

Solution: upgrade the ruby version

1. Uninstall current Ruby

yum remove ruby

2. Download Ruby stable

cd /usr/local/src

wget https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz

3. Install Ruby

tar zxvf ruby-2.5.3.tar.gz
cd ruby-2.5.3
./configure --prefix=/usr/local/ruby
make

make install

View the installed version

/usr/local/ruby/bin/ruby -v

Setting environment variables

echo "export PATH=$PATH:/usr/local/ruby/bin" >> /etc/profile

source /etc/profile

Under verification

echo $PATH

5

gem install redis

So, game install redis has been solved

Similar Posts: