Ruby on rails 4 太阳黑子轨道上的重新索引
我一直在想办法,但找不到解决办法。 我一直在尝试stackoverflow的所有建议,但到目前为止没有一个有效 我已经设置了sunspot rails,每当我尝试重新索引数据库时,都会抛出以下错误:Ruby on rails 4 太阳黑子轨道上的重新索引,ruby-on-rails-4,sunspot-rails,sunspot-solr,Ruby On Rails 4,Sunspot Rails,Sunspot Solr,我一直在想办法,但找不到解决办法。 我一直在尝试stackoverflow的所有建议,但到目前为止没有一个有效 我已经设置了sunspot rails,每当我尝试重新索引数据库时,都会抛出以下错误: rake sunspot:reindex Skipping progress bar: for progress reporting, add gem 'progress_bar' to your Gemfile rake aborted! RSolr::Error::Http: RSolr:
rake sunspot:reindex
Skipping progress bar: for progress reporting, add gem 'progress_bar' to your Gemfile
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 404 Not Found
Error: NOT_FOUND
URI: http://localhost:8982/solr/default/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:TravelAgentAccountUser</query></delete>"
Backtrace: /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:284:in `adapt_response'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:190:in `execute'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:176:in `send_and_receive'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:82:in `update'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:146:in `delete_by_query'/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:284:in `adapt_response'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:190:in `execute'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:176:in `send_and_receive'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:82:in `update'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:146:in `delete_by_query'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/indexer.rb:57:in `remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `block in remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `each'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot.rb:468:in `remove_all'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/searchable.rb:188:in `solr_remove_all_from_index'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/searchable.rb:207:in `solr_reindex'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:58:in `block (4 levels) in <top (required)>'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/class_set.rb:16:in `each'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/class_set.rb:16:in `each'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:57:in `block (3 levels) in <top (required)>'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:69:in `with_session'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `eval'
/Users/sabri/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => sunspot:reindex
(See full trace by running task with --trace)
这是在太阳黑子配置上:
production:
solr:
hostname: localhost
port: 8983
log_level: WARNING
path: /solr/production
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test
非常感谢你的帮助
我已尝试安装卸载和安装gem
重新启动我的笔记本电脑
删除配置并再次安装配置
我跑去阻止solr,但还是不行
谢谢你的帮助你失踪了
path:/solr/development
在开发环境的sunspot.yml
配置中
开发:
解决方案:
主机名:localhost
港口:8982
日志级别:信息
路径:/solr/development
此错误发生在生产或开发(您的计算机)中?。你能用“ls-l”命令附加你的rails应用程序的图像吗?这是我开发的。制作使用heroku,效果很好
production:
solr:
hostname: localhost
port: 8983
log_level: WARNING
path: /solr/production
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test