Final solution for adding ruby 2.4.2 to plesk
Run the following commands:
-----------------------
# ruby-build 2.4.2 /opt/plesk/ruby/2.4.2
# /opt/plesk/ruby/2.4.2/bin/gem install bundler
# /opt/plesk/ruby/2.4.2/bin/gem install bundle
# plesk sbin rubymng register 2.4.2 /opt/plesk/ruby/2.4.2
-----------------------
After running these commands, go to
Plesk > Extensions > Ruby > and press "Refresh".
Then, set Ruby Version
2.4.2-p198 for test domain
example.com.
Enabled SSH access for subscription system user under
Plesk > Domains > example.com > Web Hosting Access
After this, logged in the server under subscription system user and successfully run "bundle -v" command.
-------------
# su - example-user
$
$ .rbenv/shims/bundle -v
Bundler version 1.15.4
-------------