Env: ‘ruby’: No such file or directory

First off, yea you need to be in the ondemand container to get the right Ruby version and so on. This is important because the other containers may not have ruby installed at all (as you’ve found out).

I believe the hpcadmin user does have sudo privileges inside the ondemand container, but even so, if you set and export your GEM_HOME environment variable, that should clear up the errors around trying to install into /usr/share. I generally set GEM_HOME=$HOME/.gem but you could do something else as well.

You could add it to your ~/.bashrc or add it to an /etc/profile.d file so long as the container stays running (if you bounce the container, these files will get reset).

That said - not sure why it’s happening to you all of the sudden like.