Walter Lee Davis
2014-Jun-03 11:13 UTC
Starting Thinking Sphinx on Joyent SmartOS with svcadm
I followed this tutorial: http://www.neo.com/2013/10/09/unicorn-on-joyent-smartos 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 RAILS_ENV=production /usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/bundle exec rake ts:stop RAILS_ENV=production and these environment variables to set the necessary paths: svccfg -s sphinx setenv PATH /usr/local/rvm/gems/ruby-1.9.3-p547/bin:$PATH svccfg -s sphinx setenv GEM_PATH /usr/local/rvm/gems/ruby-1.9.3-p547:/usr/local/rvm/gems/ruby-1.9.3-p547@global What resulted was a death by a thousand errors; this repeated over and over: [ 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 `~' /usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks193:15:in `eval' /usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks193:15:in `<main>' (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, Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/E9315FEF-2418-4179-BA01-C243CC7008E3%40wdstudio.com. For more options, visit https://groups.google.com/d/optout.