title: How do i use RVM w/ Hudson CI server on Debian?
body: <p>I'm trying to setup an automated "build" server for my rails projects using Hudson CI. SO far it's able to run specs and do metrics on the code but I have 2 different projects dependent on 2 different versions of ruby. So i'm trying to use RVM to run multiple copies of ruby then switch back and forth in a pre-build step. </p>
  
  <p>I found a couple posts like <a href="http://www.pathf.com/blogs/2010/05/continuous-integration-multiple-ruby-versions-rvm-hudson/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+AgileAjax+%28Agile+Ajax%29" rel="nofollow noreferrer">this one</a> that try and explain how to make this work, but I'm not running a startup script for hudson, it starts on boot which is how it worked out of the box when i installed it via the debian instructions. </p>
  
  <p>The problem seems to be that even though hudson runs under the "hudson" account and that account has rvm installed (and working) when it tries to run a shell based prebuild step to call rvm switch 1.8.7 it fails with the error "rvm: command not found"</p>
  
  <p>Not sure what I'm doing wrong. Hudson is using SH as its shell but i also tried using bash. no luck. </p>
  
  <p>Has anyone gotten this working before in this setup?</p>