On Ubuntu 18.04 using the instructions here I've installed OpenLiteSpeed via the CyberPanel install, and then installed Ruby using the following commands in the terminal/console:
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
apt install rbenv libreadline-dev ruby-dev -y
export TMPDIR=/mytmp/
rbenv install 2.5.0
rbenv global 2.5.0
gem install rack -v 1.6.11
gem install ruby-lsapi
But now I'm confused about the paths and where to "setup context". The instructions above show the default ruby location different to the instructions for Litespeed and different to where I've found ruby on the server and the ENV values. The locations on the server for 'ruby' are:
/root/.rbenv/versions/2.5.0/bin/ruby
/root/.rbenv/shims/ruby
/etc/apparmor.d/abstractions/ruby
The command gem env shows the following:
Installation directory: /var/lib/gems/2.5.0
User installation directory: /root/.gem/ruby/2.5.0
Ruby executable: /usr/bin/ruby2.5
Executable directory: /usr/local/bin/
In the OpenLiteSpeed admin panel under Server Configuration > App Server I've found Rack/Rails Default Settings. What should I add here for Ruby Path and what other configuration would I need to do please?
I have limited knowledge of Ubuntu/Linux and OpenLiteSpeed, and almost zero knowledge about Ruby.
EDIT: I'm installing Ruby only because I want to install and test ShareTribe which requires Ruby.
EDIT: I've removed Ruby 2.5 and installed 2.6 with the following commands:
sudo apt-get purge ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz
tar -xzvf ruby-2.6.6.tar.gz
cd ruby-2.6.6/
./configure
make ...SLOW
sudo make install
All looked good so far, but then the next command gem install bundler
gave the error /usr/bin/gem: no such file or directory
. So another path error.