Forum: Ruby on Rails Starting Thinking Sphinx on Joyent SmartOS with svcadm

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2014-06-03 13:14
(Received via mailing list)
I followed this tutorial: and the
RailsCast about configuring Nginx and Unicorn, and successfully set up
my first non-Passenger/Apache Rails app last weekend.

Buoyed by this success, I next set about trying to get ThinkingSphinx to
restart when the server starts, and managed to get my server to run away
with 115% server usage. (Oddly, while that was going on, TS was working
just fine.)

As you know, starting TS requires one to cd into the Rails directory,
then issue a rake command: rake ts:start

Using these commands to start and stop, then:

/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/bundle exec rake ts:start
/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/bundle exec rake ts:stop

and these environment variables to set the necessary paths:

svccfg -s sphinx setenv PATH
svccfg -s sphinx setenv GEM_PATH

What resulted was a death by a thousand errors; this repeated over and

[ Jun  3 01:10:02 Stopping because service exited with an error. ]
[ Jun  3 01:10:02 Executing start method
("/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/bundle exec
/usr/local/rvm/gems/ruby-1.9.3-p547/bin/rake ts:start
RAILS_ENV=production"). ]
rake aborted!
ArgumentError: couldn't find HOME environment -- expanding `~'
(See full trace by running task with --trace)

Can anyone point me to a recipe for using svcadm to start a Rails helper
like this? Anyone see a glaring error in my approach?

Thanks in advance,

This topic is locked and can not be replied to.