Installing ancient Ruby versions and Gems on Arch/Manjaro

Created: June 01, 2019 12:59 | Updated: September 01, 2019 16:45
Tags: Linux, Rails 5, Ruby

This process ... sucks to put it lightly, hopefully my notes can save someone else pain!

You can also take a look at this page for rbenv and this one for asdf

Ruby 2.1.5 (rbenv)

I had to install an older version of bundler as well.

curl -fsSL | PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig rbenv install --patch 2.1.5 -v
gem install bundler -v '1.17.1' 

Ruby 2.2.3 (rbenv)

Install openssl-1.0

curl -fsSL | PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig rbenv install --patch 2.2.3 -v

Ruby 2.3.3 (asdf)

PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig RUBY_EXTRA_CONFIGURE_OPTIONS="--with-openssl-dir=/usr/lib/openssl-1.0" asdf install ruby 2.3.3

Ruby 2.3.3 (rbenv)
sudo pacman -S openssl-1.0
PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig/:/usr/lib/pkgconfig/ RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/lib/openssl-1.0/ rbenv install 2.3.3 -v

install imagemagick6 and replace current version

rmagick 3.0.0 (rbenv)

Not compatible with ImageMagic 7, needs ImageMagick 6

sudo C_INCLUDE_PATH=/usr/include/ImageMagick-6/ gem install rmagick -v 3.0.0

rmagick 3.0.0 (asdf)

Not compatible with ImageMagic 7, needs ImageMagick 6

C_INCLUDE_PATH=/usr/lib/imagemagick6 PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick -v 3.0.0

Needs a pre 2.0 version of Bundler

gem install bundler:1.17.1
bundle _1.17.1_ install

Install an older version of libmagick6

This may be required to install libmagick6

Disable signature checking (reverse these changes after!)

Open the config

sudo nano /etc/pacman.conf

And add this line

RemoteFileSigLevel = Optional

Downgrade your package

sudo pacman -U

And re-enable your signature checking by removing that line from pacman.conf

Written by Alan Vardy. Let me know how I can make this better!