> Everything works fine when I SSH into my server and run
> /etc/init.d/thin restart
> But when I do this via cap like so:
> namespace :thin do
> task :restart, :roles => [:app, :web] do
> run "ruby /etc/init.d/thin restart"
> end
> end
> It bombs out on me with:
> cap thin:restart
> * executing `thin:restart'
> * executing "ruby /etc/init.d/thin restart"
> servers: ["mysite.com"]
> [mysite.com] executing command
> ** [out :: mysite.com] /usr/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
> `report_activate_error': Could not find RubyGem thin (>= 0)
> (Gem::LoadError)
> ** [out :: mysite.com] from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:
> 134:in `activate'
> ** [out :: mysite.com] from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:
> 49:in `gem'
> ** [out :: mysite.com] from /usr/local/rubygems/gems/bin/thin:18
> WTF??
> For a sanity check I ran gem list and:
> actionmailer (2.1.0)
> actionpack (2.1.0)
> activerecord (2.1.0)
> activeresource (2.1.0)
> activesupport (2.1.0)
> cgi_multipart_eof_fix (2.5.0)
> daemons (1.0.10)
> eventmachine (0.12.0)
> fastthread (1.0.1)
> fcgi (0.8.7)
> gem_plugin (0.2.3)
> haml (2.0.1)
> mysql (2.7)
> rack (0.3.0)
> rails (2.1.0)
> rake (0.8.1)
> termios (0.9.4)
> thin (0.8.2)
> Any ideas?