Skip to content

Instantly share code, notes, and snippets.

@leonardostefani
Last active March 6, 2021 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leonardostefani/0412503fb74c468788c6ce51022212e3 to your computer and use it in GitHub Desktop.
Save leonardostefani/0412503fb74c468788c6ce51022212e3 to your computer and use it in GitHub Desktop.
Plesk - Installing Ruby 2.1 - 2021 Method
  1. Download & extract openssl-1.0.1h
cd /tmp
wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
tar -xzvf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
  1. Configure OpenSSL
./config --openssldir=/usr/local/openssl-1.0.1 shared zlib-dynamic
  1. Make and install OpenSSL (without docs 'install_sw')
make
sudo make install_sw
  1. Install Ruby Plesk extension
https://support.plesk.com/hc/en-us/articles/115000180213
  1. Configure Ruby
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ru
apt install autoconf bison build-essential libyaml-dev libreadline6-dev zlib1g zlib1g-dev
  1. Install Ruby
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/openssl-1.0.1 /root/.rbenv/plugins/ru/bin/ruby-build 2.1.6 /opt/plesk/ruby/2.1.6/
  1. Configure Ruby
curl -fsSL curl.haxx.se/ca/cacert.pem -o "$(/opt/plesk/ruby/2.1.6/bin/ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')"

/opt/plesk/ruby/2.1.6/bin/gem install bundler -v '< 2'

plesk sbin rubymng register 2.1.6 /opt/plesk/ruby/2.1.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment