trinidad init services JRubyDaemon: no such file to load -- trinidad

Skip to first unread message

Peter Ehrlich

Dec 29, 2012, 3:09:55 PM12/29/12

Just set up a fresh Rails app-- RVM, Capistrano, Nginx, Trinidad; similar to Ryan Bates' Railscast on the subject.  Now trying to use trinidad init services to have trinidad run as a service.  It's not working:

↳  service trinidad_MyApp start
Starting trinidad daemon...
sudo -u root /usr/bin/jsvc -home /usr/lib/jvm/java-7-openjdk/jre -wait 20 -pidfile /root/MyApp/shared/pids/ -procname jsvc-trinidad -jvm server -outfile /root/MyApp/shared/log/trinidad.log -errfile &1 -cp /usr/local/rvm/gems/jruby-1.7.1/gems/trinidad_init_services-1.2.2/trinidad-libs/jruby-jsvc.jar:/usr/local/rvm/gems/jruby-1.7.1/gems/trinidad_init_services-1.2.2/trinidad-libs/commons-daemon.jar:/usr/local/rvm/rubies/jruby-1.7.1/lib/jruby.jar -Djffi.boot.library.path=/usr/local/rvm/rubies/jruby-1.7.1/lib/native/arm-Linux:/usr/local/rvm/rubies/jruby-1.7.1/lib/native/i386-Linux:/usr/local/rvm/rubies/jruby-1.7.1/lib/native/x86_64-Linux -Djruby.home=/usr/local/rvm/rubies/jruby-1.7.1 -Djruby.lib=/usr/local/rvm/rubies/jruby-1.7.1/lib -Djruby.script=jruby -Djruby.compat.version=RUBY1_9 -Xmx500m -Xss2048k -Xbootclasspath/a:/usr/local/rvm/rubies/jruby-1.7.1/lib/jruby.jar -Dfile.encoding=UTF-8 com.msp.jsvc.JRubyDaemon /usr/local/rvm/gems/jruby-1.7.1/gems/trinidad_init_services-1.2.2/lib/trinidad/daemon.rb -d /root/MyApp/current -e production
Daemon exited with status: 1. Check pidfile and log

In the log file:

↳  cat /root/MyApp/current/log/trinidad.log 
JRubyDaemon: Script raised an error: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- trinidad
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- trinidad
at org.jruby.RubyKernel.require(org/jruby/
at RUBY.require(/usr/local/rvm/rubies/jruby-1.7.1/lib/ruby/shared/rubygems/custom_require.rb:36)
at usr.local.rvm.gems.jruby_minus_1_dot_7_dot_1.gems.trinidad_init_services_minus_1_dot_2_dot_2.lib.trinidad.daemon.(root)(/usr/local/rvm/gems/jruby-1.7.1/gems/trinidad_init_services-1.2.2/lib/trinidad/daemon.rb:2)
Cannot load daemon
Service exit with a return value of 3

We assume that this may have something to do with RVM and bundler/gem install paths.


Tim Olsen

Jan 2, 2013, 10:25:44 AM1/2/13
I agree that this is probably due to rvm and/or bundler/gem install paths.  I see you are starting trinidad as root.  First figure out the rvm or bundler command to get paths set up properly (maybe rvmsudo and/or bundle exec) as root.


Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para ver este debate en la Web, visita
Para publicar una entrada en este grupo, envía un correo electrónico a
Para anular tu suscripción a este grupo, envía un correo electrónico a
Para tener acceso a más opciones, visita el grupo en

Oleg Kovalenko

Jul 22, 2013, 2:49:30 PM7/22/13
Faced with the same problem.

Need to populate env variables (see

1 Generate env variables file (for example: ruby version 1.9.2-p290, gemset projectX):
$ rvm env --path -- 1.9.2-p290@projectX # will produce something like /path/to/env/variables/file/ruby-1.9.2-p290@projectX

2 Add line (written below) to generated /etc/init.d/trinidad at top, right after RUBY_SCRIPT=...
source /path/to/env/variables/file/ruby-1.9.2-p290@projectX

and don't forget to set owner of to user running trinidad.

Субота, 29 грудня 2012 р. 22:09:55 UTC+2 користувач Peter Ehrlich написав:
Reply all
Reply to author
0 new messages