Hi all,
I'm currently trying to set up a cron to regularly reindex my application. I've explicitly set the PATH variable to include my own PATH (brute force I know) but I'm still getting errors.
RVM is installed on /usr/local/rvm.
-- Here is my entire crontab (user gcahill) - (note my path is what I get when I type echo $PATH into an interactive shell - quick and dirty I know!):
PATH=/usr/local/rvm/gems/ruby-1.9.2-p180/bin:/usr/local/rvm/gems/ruby-1.9.2-p180@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p180/bin:/usr/local/rvm/bin:/usr/local/sphinx/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SHELL=/bin/bash
RAILS_ENV=production
*/1 * * * * $HOME/scripts/reindex_db > $HOME/scripts/reindex_output.log 2>$HOME/scripts/reindex_error.log
-- And here is the script: reindex_db
#!/bin/sh
bundle exec rake ts:reindex RAILS_ENV=production
-- And lastly, here's the error written to reindex_error.log
/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /usr/local/rvm/gems/ruby-1.9.2-p180/bin/bundle:18:in `<main>'
Looks like it's a path related error, but I'm not sure what else I can do if I'm already explicitly setting my path to point to my rvm directories...
Any tips?
Thanks in advance!!
--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/iH5L-wjqMtoJ.
To post to this group, send email to thinkin...@googlegroups.com.
To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.