I have install ruby by rvm (system-wide), and worked correctly via normal console and my rails program is behaving correctly with both rails runner and ap
rails runner
ap
If you installed ruby via rvm, ruby probably isn't in /usr/bin. Depending on where rvm is installed:
bash -c "source /usr/local/lib/rvm" && rails runner foo.bar
You probably added a source */rvm to your bashrc that is the correct rvm loading script.