title: Can't start thin server as service, RubyGems: Could not find thin
body: <p>I used the following instructions to install and configure the Thin server as a service on Ubuntu 10.04.4 with Rails 3.2.3:</p>
  
  <p><a href="http://articles.slicehost.com/2008/5/6/ubuntu-hardy-thin-web-server-for-ruby" rel="nofollow noreferrer">http://articles.slicehost.com/2008/5/6/ubuntu-hardy-thin-web-server-for-ruby</a></p>
  
  <p>Thin server works fine running it from the application root, using 'thin start'</p>
  
  <p>However, when I try to run the service using any of these commands:</p>
  
  <pre><code>service thin start
  sudo service thin start
  /etc/init.d/thin start
  sudo /etc/init.d/thin start
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>/home/myuser/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find thin (&gt;= 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/myuser/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
      from /home/myuser/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
      from /home/myuser/.rvm/gems/ruby-1.9.3-p125/bin/thin:18:in `&lt;main&gt;'
  </code></pre>
  
  <p>This does not seem to be an issue with PATH, 'which thin' correctly returns:</p>
  
  <pre><code>home/myuser/.rvm/gems/ruby-1.9.3-p125/bin/thin
  </code></pre>
  
  <p>I have also verified the existence of **/bin/thin wherever it's referenced</p>
  
  <p>I have tried reinstalling the gem using 'gem uninstall thin', 'gem install thin' without success</p>
  
  <p>Has anyone experienced this before?  I only found one other instance of this problem:
  <a href="https://stackoverflow.com/questions/10314138/cannot-restart-thin-via-remote-machine">Cannot restart thin via remote machine</a></p>
  
  <p>That issue seems to have been only over ssh, while I can't even get the thin service started locally</p>
  
  <p>Thanks</p>