RVM path issue.

Follow

Comments

2 comments

  • Avatar
    Yogi Kulkarni

    With "su - go" an interactive shell is started, which sources ~/.bashrc and PATH might be defined there correctly. However when a service is started it uses a non-interactive shell, which does not look at ~/.bashrc by default.


    The easiest way to fix this is to export PATH in /etc/defaults/cruise-agent (or /etc/defaults/go-agent depending on which version you have installed). Restart the agent for the change to take effect.


    If you want a global variable to be available to all processes, you could also try adding it to /etc/environment (depending on which Linux distro you use).


    -Yogi

  • Avatar
    janmejay

    Hi Felix,


    RVM plays with environment variables in local shell session. If you want go to use the environment variables you have on your rvm-sourced shell, you need to run go-agent from the same shell, as the same user. 


    This usually means, you can't use dist-specific installer. You'll want to get .zip distribution, unzip it somewhere in your $HOME, and use agent.sh to launch it. It will run with your privileges, which is usually discouraged for security reasons.


    Regards,


    Janmejay

Please sign in to leave a comment.