I'm trying to run a backup script on ubuntu. My problem is that I'm trying to do this using the postgres user account that I setup on ubuntu. I believe having this account run the cron jobs is best because it's more of a general account and should I leave the company one day at least they won't have to worry about any cron jobs that might be destroyed if they should destroy my user account on the server, however, I'm having a difficult time getting this working mainly because my postgres user account is not able to see the same ruby environment (I think).
I'm running rvm to control my ruby environment and after adding the direct path to bundle, which is under the rvm install, I'm still getting an error. I'm at a point in which I don't know what else to do.
Error:
/home/my_personnel_account/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /home/my_personnel_account/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /home/my_personnel_account/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /home/my_personnel_account/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle:22:in `<main>'