Ruby

Discussion in 'Installation/Configuration' started by Kemp, Jul 31, 2023.

  1. Kemp

    Kemp Member

    Hi,

    When I install ruby using rbenv as a shell user [web1 - ISPConfig - Debian 11], it works fine but after I log out and log back in ruby -v does not work anymore.

    How can I resolve this issue?

    Thank you!
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What happens instead?
    Is ruby directory added to PATH?
     
  3. Kemp

    Kemp Member

    It's installed under /var/www/clients/client0/web1/home/username/.rbenv

    Shouldn't it be in path?

    Thank you!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem might be the path indeed. Check if you can ruby using the full path to the binary. If this works, check with:

    echo $PATH

    if the path to that folder is in your local path variable.
     
  5. Kemp

    Kemp Member

    It's not, how can I add the path?

    Thank you!
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Use Internet Search Engines with
    Code:
    linux add directory to path
    I'm sure using PATH variable is explained in any Linux user guide, so consult those.
     
  7. Kemp

    Kemp Member

    Hi,

    It's been added to the following, but after I log out it still doesn't work:
    .profile
    .bashrc

    Thank you!
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you run bash shell, setting PATH in ~/.bashrc should work. Does your edit show if you do
    Code:
    more ~/.bashrc
     
  9. Kemp

    Kemp Member

    Yes, it shows.

    Thank you!
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So PATH is working now and command ruby is found?
    If not, show what you wrote in ~/.bashrc, and the output of
    Code:
    echo $PATH
     
  11. Kemp

    Kemp Member

    It only shows the PATH after I add it when logged in, and ruby works, but after I log out the PATH no longer works or shows when I echo $PATH.

    The PATH is not being added to the following files either:
    .profile
    .bashrc

    If I edit the above files manually and add the PATH, echo $PATH still doesn't show the PATH.
     

Share This Page