title: RVM and thin, root vs. local user
body: <p>So I'm trying to get thin to run as a service with RVM. After a <code>thin install</code> I manually updated <code>/etc/init.d/thin</code> to use an <code>su - user</code> when running the config command so that thin was running as a local user, rather than root. So far so good.</p>
  
  <p>Now, when I try to <code>sudo service thin start</code> it looks like it's trying to use the non-RVM version of Ruby (1.8.7 which was installed on the box to start with) to actually execute the command. I did a <code>gem install thin</code> on the non-RVM version, which then gets me a <code>uninitialized constant Bundler</code> message&mdash;Bundler is only installed in the RVM gems, not the system gems. It looks like I can't get the RVM environment set up (even though my RVM startup script is in ~/.bashrc which is then included in ~/.bash_profile).</p>
  
  <p>All I want to do is run thin as a service using the RVM environment, not the system environment. Is this even possible? Should I just give up and commit the ultimate sin of running everything as root? It's very tempting at this point.</p>
  
  <p>Thanks for any help!</p>