• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Ruby Versions (Ruby extension)

Amin BS

New Pleskian
Hello I'm using Plesk Onyx on CentOS 6 with the Ruby extension, and the last available version of the language available in the extension is 2.4.0 . Can I install the latest version of Ruby and make it work within the extension? and if so how?
 
Hi Igor I installed the version using ruby-build successfully and registered it with the following command
"plesk sbin rubymng register 2.4.1 /opt/plesk/ruby/2.4.1" and now when I run "plesk sbin rubymng versions" the added version shows up normally But it doesn't in the Web interface
 
Update there is one final missing step, you need to go to "Extensions" in Plesk click on the "Ruby extension" then "Go to extension" and the new version will show up on the web interface
 
Hello,

I'm trying to upgrade [email protected] (security fix), i followed the steps above and i have a green dot on the "Ruby extension" page so it's correctly registred.
When i select that version on my domain/ruby page, and i try bundle, an error says that there is no bundle for that version, only for a list of precedent versions..

When i try: gem install bundler (from ssh) :
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /opt/plesk/ruby/2.4.2/lib/ruby/gems/2.4.0 directory.


How can i get bundler via Plesk ? (or else)
Thank you !

Plesk Onyx 17.5.3
‪CentOS Linux 7.4.1708 (Core)‬
 
Last edited:
Solved with :
Code:
gem install bundler --user-install
from the app directectory


But i still can't launch normal rake task like: -T
It says:
Code:
rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  1.9.3
  2.0.0
  2.1.10
  2.1.8
  2.2.4
  2.2.5
  2.2.6
  2.3.0
  2.3.1
  2.3.3
  2.4.0
 
Last edited:
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
-------------
 
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
-------------
Worked like a charm thank you man !
 
Back
Top