“su - app” vs “su app”
-, -l, --login Provide an environment similar to what the user would expect had the user logged in directly.
su - app, after switch to the user
app, you end up in the user’s HOME directory,
and have the user’s
Tools like RVM need a “login shell”.
RVM by default adds itself currently to ~/.bash_profile file
So if use
su app, RVM will not be ready there for you.