Sunspot 未在开发端口上启动
我正在尝试在开发端口(8982)上运行 sunspot。 我运行以下命令 $ RAILS_ENV=development rake sunspot:solr:start
Sunspot 启动,但它不在开发端口上启动,而是在端口 8983 上启动,这是生产端口。 我没有使用 config/sunspot.yml。我有一个 config/initializers/sunspot.rb 文件,其内容如下
require File.join(Rails.root, 'lib', 'sunspot', 'rails', 'adapters')
Sunspot::Adapters::InstanceAdapter.register(Sunspot::Rails::Adapters::ActiveRecordInstanceAdapter, ActiveRecord::Base)
Sunspot::Adapters::DataAccessor.register(Sunspot::Rails::Adapters::ActiveRecordDataAccessor, ActiveRecord::Base)
module Sunspot
HIGHLIGHTS = {
:elements => ['span'], :attributes => { 'span' => ['class'] }
}
另外在 config/environments/development.rb 中,我有一行内容为“
Sunspot.config.solr.url = 'http://localhost:8982/solr'
我不确定我做错了什么”。我需要在端口 8982(开发节点)上启动 sunspot。
任何帮助将不胜感激
I am trying to run sunspot on the development port (8982).
I run the following command
$ RAILS_ENV=development rake sunspot:solr:start
Sunspot starts but it does not start on the development port, it starts on port 8983, which is the production port.
I am not using config/sunspot.yml. I have a config/initializers/sunspot.rb file which reads as follows
require File.join(Rails.root, 'lib', 'sunspot', 'rails', 'adapters')
Sunspot::Adapters::InstanceAdapter.register(Sunspot::Rails::Adapters::ActiveRecordInstanceAdapter, ActiveRecord::Base)
Sunspot::Adapters::DataAccessor.register(Sunspot::Rails::Adapters::ActiveRecordDataAccessor, ActiveRecord::Base)
module Sunspot
HIGHLIGHTS = {
:elements => ['span'], :attributes => { 'span' => ['class'] }
}
Additionally in config/environments/development.rb I have a line that reads
Sunspot.config.solr.url = 'http://localhost:8982/solr'
I am not sure what I am doing wrong. I need to start sunspot on Port 8982 ( the development node).
Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 https://github.com/sunspot/sunspot/issues/262 来跟踪错误的解决方案。
See https://github.com/sunspot/sunspot/issues/262 to track the resolution of the bug.