• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Ruby and NodeJS for user space (chrooted) not working

cool_sh

Basic Pleskian
Hi,

I wanted to use the latest Ruby 2.7 and NodeJS 14 versions but didn't get them work for the user space. I installed them (before the new extension supported auto-upgrade).

First installed the latest Ruby 2.7 on Plesk Obsidian.
Code:
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
PREFIX=/usr/local .rbenv/plugins/ruby-build/install.sh

ruby-build 2.7.4 /opt/plesk/ruby/2.7.4
/opt/plesk/ruby/2.7.4/bin/gem install bundler
/opt/plesk/ruby/2.7.4/bin/gem install bundle
#/opt/plesk/ruby/2.7.4/bin/gem install rails
plesk sbin rubymng register 2.7.4 /opt/plesk/ruby/2.7.4

After running these commands, go to Plesk > Extensions > Ruby > and press "Refresh".

Then, set Ruby Version 2.7.4-p191 for the domain.

Switched to Shell for that user and showing the ruby version works but not for gem or rails:

Code:
[/] ruby --version
ruby 2.6.8p205 (2021-07-07 revision 67951) [x86_64-linux]

[/] rails --version
bash: rails: command not found

[/] gem --version
bash: rails: command not found


Second problem seems to be within NodeJS. Installed it but have no ide how to get NPM (or YARN) for it:

Code:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"

nvm install v14.17.6

mkdir /opt/plesk/node/14
yes | cp -R ~/.nvm/versions/node/v14.17.6/* /opt/plesk/node/14/
plesk sbin nodemng register /opt/plesk/node/14/bin/node

Code:
[/] node --version
v14.17.6

[/] npm --version
TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/opt/plesk/node/14/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/agent.js:114:44)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/opt/plesk/node/14/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/index.js:5:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/opt/plesk/node/14/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:161:25)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)

Any hint would be much appreciated.
 
Back
Top