• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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