Can't get launchd task to run
I had the same issue, trying to run a script on an interval using LaunchControl (great app, check it out). Will copy and paste straight from the source that helped me:


  For GUI programs the default shell environment scripts are ignored, and therefore
  RVM managed ruby versions.
  
  The workaround is to define them via launchctl. Those values are gone
  though after a reboot, so I put them in .bash_profile since I open a shell anyhow all the time, see below.
  
  launchctl setenv GEM_HOME ~/.rvm/gems/ruby-2.2.1
  launchctl setenv GEM_PATH ~/.rvm/gems/ruby-2.2.1:/Users/markus/.rvm/gems/ruby-2.2.1@global
  
  All more permanent solutions (e.g. launchd.conf) don't work anymore in 10.10.
  Hope that helps anyone who ran into a similar issue.


In my case I just set it up the correct GEM_HOME and PATH in LaunchControl.