title: Ubuntu: 'unicorn_init.sh start' works, but 'service unicorn_init start' does NOT
body: <p>I have installed nginx with unicorn on an Ubuntu 12.04 server. Everything works, site, db, unicorn...good. So I'm trying to make sure that after a reboot, nginx and unicorn start up. I have set update-rc.d for my unicorn process, but it doesn't start/work after a reboot. I suspect it has something to do with ubuntu's use of &quot;service&quot; as opposed to &quot;/etc/init.d/unicorn_init &quot;</p>
  <p>In other words:</p>
  <p>If I execute:</p>
  <pre><code>$ /etc/init.d/unicorn_init start
  </code></pre>
  <p>unicorn starts up just fine, no errors.</p>
  <p>If I execute:</p>
  <pre><code>$ service unicorn_init start
  </code></pre>
  <p>it fails and unicorn does not start.</p>
  <p>I've think it has something to do with paths. Ive added environment PATHS to PATH, GEM_PATH, &amp; GEM_HOME, but I still receive the same results</p>
  <h1>1, If I run /usr/local/rvm/gems/ruby-1.9.3-p194/bin/unicorn, I get errors:</h1>
  <pre><code>usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find unicorn (&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 /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
      from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
      from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/unicorn:18:in `&lt;main&gt;'
  </code></pre>
  <h1>2, If I run /var/rails/web-app/bin/unicorn, I get errors:</h1>
  <pre><code>/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler/setup (LoadError)
      from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from /var/rails/web-app/bin/unicorn:14:in `&lt;main&gt;'
  </code></pre>
  <p>Any help would be greatly appreciated! Thanks</p>