• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question Ruby On Rails: how to execute through SSH rake or rails in the same way as provided CLI?

Alban Staehli

Regular Pleskian
Hi,

I have installed a Ruby on Rails app within Plesk Onyx 17.5.3 (on CentOS 7) - successful, thanks to the Plesk Ruby extension.
When I'm into Plesk admin UI, I can execute the rake task within the selected env. and version of Ruby. This works pretty well.

Nevertheless, I wish to run some commandes through SSH (for bash purpose, executed by crontab).
Therefore I went into the app folder and tried to execute rake:
Code:
 cd /path/to/AppRootFolder/
bundle exec rake -T
>> Could not find rake-12.3.2 in any of the sources
>> Run `bundle install` to install missing gems.
rake -T
>> Could not find rake-12.3.2 in any of the sources
>> Run `bundle install` to install missing gems.

So I tried to run bundle install (already done through the Plesk UI):
Code:
 bundle install
>> The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
>> Fetching gem metadata from https://rubygems.org/.........
>> i18n-1.6.0 requires ruby version >= 2.3.0, which is incompatible with the current version, ruby 2.0.0p648

Obviously, running these command from SSH shows that it is not within the same env. setup as the CLI from the UI, as the Ruby version in Plesk CLI is 2.4.4p296, and not 2.0.0p648.

So how to run command from SSH within the app root folder within the same env. setup as for the CLI available in Plesk UI? I want to execute commands directly from SSH in the same way I do it from the CLI in Plesk UI.

Thank you.
 
Back
Top