trinidad/trinidad — Issue #44: Trinidad doesn't work with capistrano
Author: sauliusgrigaitis
Created: 2012-01-10 17:03:29+00:00
State: open

I deploy application with Capistrano and I use RVM. I try to specify current path (like /apps/great_app/current) for trinidad so I don't need to do full trinidad restart, but seems it doesn't work. I touch tmp/restart.txt after redeploy (so /apps/great_app/current is resymlinked to new release directory) and then application just throws standard Rails "something went wrong" without any output to rails log. Any ideas why that can be a problem?

Then I tried to do full trinidad from capistrano, but probably because of RVM it can't find bundled gems (interesting thing is that executing exactly same script directly at server's bash works fine):

cap tsung deploy:start BRANCH=jruby_tsung
* executing `tsung'
triggering start callbacks for `deploy:start'
* executing `multistage:ensure'
* executing `deploy:start'
* executing "cd /vol/apps/tsung_city/current && jruby --server -J-Djruby.compile.mode=FORCE -J-XX:MaxPermSize=1024m -J-Xmx3000m -S trinidad --threadsafe -e production --config config/trinidad.yml -p 8080 --load daemon -d /vol/apps/tsung_city/current"
servers: ["192.168.2.122"]
Password:
[192.168.2.122] executing command
** [out :: 192.168.2.122] Jan 10, 2012 5:51:52 PM org.apache.coyote.AbstractProtocol init
** [out :: 192.168.2.122] INFO: Initializing ProtocolHandler ["http-bio-8080"]
** [out :: 192.168.2.122] Jan 10, 2012 5:51:52 PM org.apache.catalina.core.StandardService startInternal
** [out :: 192.168.2.122] INFO: Starting service Tomcat
** [out :: 192.168.2.122] Jan 10, 2012 5:51:52 PM org.apache.catalina.core.StandardEngine startInternal
** [out :: 192.168.2.122] INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
** [out :: 192.168.2.122] 2012-01-10 15:51:52 INFO: No global web.xml found
** [out :: 192.168.2.122] 2012-01-10 15:51:53 INFO: Info: received max runtimes = 1
** [out :: 192.168.2.122] 2012-01-10 15:51:53 INFO: jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-05 2d7a450) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [linux-amd64-java]
** [out :: 192.168.2.122] Could not find jruby-rack-1.1.2 in any of the sources
** [out :: 192.168.2.122] Run `bundle install` to install missing gems.
** [out :: 192.168.2.122] 2012-01-10 15:52:01 SEVERE: unable to create shared application instance
** [out :: 192.168.2.122] 2012-01-10 15:52:01 SEVERE: Error: application initialization failed
** [out :: 192.168.2.122] 2012-01-10 15:52:01 INFO: Starting ProtocolHandler ["http-bio-8080"]

I tried to add bundle exec before "trinidad", but it didn't work.