Your first suggestion worked like a charm. Saved me lots of frustration. Thanks!
On Wednesday, April 24, 2013 12:25:00 PM UTC-4, Lee Hambley wrote:First things first, report this to the solr developers, they shouldn't be prompting for input unless stdin is a tty.
And then change your task to be:
desc "reindex the whole database"
task :reindex, :roles => :app do
stop
run "rm -rf #{shared_path}/solr/data"
start
run "cd #{current_path} && yes | RAILS_ENV=#{rails_env} bundle exec rake sunspot:solr:reindex"
end
Note
the addition of `yes |` this should echo "y" onto std in forever (thus
it'll say yes to any program that asks for input) - if that doesn't
work, you can also do `echo myanswer | RAILS_ENV.............` (echo
something specific) - if neither of those things work solr is too badly
behaved and you'll have to resort to `gnu expect` but that's almost
certainly going to make you very, very unhappy.
The
task just hangs at this point and cannot complete. I have been
searching for ways to bypass this warning, however haven't found any
surprisingly. Any help is appreciated.
--