getaddrinfo:solr sunspot 未知名称或服务
我正在尝试使用 Rails 3.1 运行 solr 和 sunspot,但我不断收到错误消息,
getaddrinfo: Name or service not known
我的控制器相当基本
def index @food_names = FoodName.search do keywords(params[:term]) end end
,我仍然不太确定这里发生了什么。我必须启动单独的 solr 服务吗?
当我运行 rake sunspot:solr:run 时,我得到了一个
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rdoctask.rb WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Kitchon::Application#task called at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/application.rb:214:in `initialize_tasks' WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/sunspot_rails-1.2.0/lib/sunspot/rails/tasks.rb:41:in `block in ' rake aborted! Server is already running with PID 4012 Tasks: TOP => sunspot:solr:start (See full trace by running task with --trace)
有点令人不安的信息,但正如输出所示,服务器已经在运行,所以我认为它正在工作。
关于我可能做错了什么或者如何解决这个问题有什么建议吗?
I'm attempting to run solr and sunspot with rails 3.1, but I keep getting the error
getaddrinfo: Name or service not known
my controller is fairly basic
def index @food_names = FoodName.search do keywords(params[:term]) end end
I'm still not quite sure about what is going on here. do I have to start a separate solr service?
When I run rake sunspot:solr:run, I get a
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rdoctask.rb WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Kitchon::Application#task called at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/application.rb:214:in `initialize_tasks' WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/sunspot_rails-1.2.0/lib/sunspot/rails/tasks.rb:41:in `block in ' rake aborted! Server is already running with PID 4012 Tasks: TOP => sunspot:solr:start (See full trace by running task with --trace)
which is a bit disconcerting, but as the output says, the server is already running, so I think it is working.
Any suggestions on what I may be doing wrong, or how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论