I hope somebody can help me with the following.
I need my Raspberry to run a ruby script on startup which uses ruby's eventmachine package. I've installed rvm, the correct ruby version (2.1.0-dev), and all necessary packages, and if I start the script manually (using a startup.sh that calls the ruby script), all runs well. However, when the script is called from crontab (using @reboot), it gives the error message (in an output file) that it cannot load the eventmachine file.
If I then log on to the raspberry and run the script again (without doing anything else in between), everything works fine. It seems as if the script starts before rvm is properly setup, but this doesn't happen only at shell login, does it? I'm calling ruby with an absolute path (/home/pi/.rvm/rubies/ruby-2.1.0-dev/bin/ruby), so that also can't be it.
Any help would be greatly appreciated.